mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-06 23:52:12 +01:00
use user scm to run scm-server for rpm package installations
This commit is contained in:
@@ -178,6 +178,7 @@
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>deb</goal>
|
||||
<goal>rpm</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
@@ -197,6 +198,7 @@
|
||||
<architecture>noarch</architecture>
|
||||
<os>linux</os>
|
||||
</platform>
|
||||
<rpmPreInstallScript>${project.basedir}/src/main/nativepkg/rpm-create-user</rpmPreInstallScript>
|
||||
<mappings>
|
||||
<files>
|
||||
<file>
|
||||
@@ -245,10 +247,6 @@
|
||||
</file>
|
||||
</files>
|
||||
<links>
|
||||
<link>
|
||||
<source>/usr/sbin/scm-server</source>
|
||||
<target>/opt/scm-server/bin/scm-server</target>
|
||||
</link>
|
||||
<link>
|
||||
<source>/opt/scm-server/var/log</source>
|
||||
<target>/var/log/scm</target>
|
||||
@@ -265,12 +263,21 @@
|
||||
</directory>
|
||||
<directory>
|
||||
<path>/var/cache/scm/work</path>
|
||||
<uname>scm</uname>
|
||||
<gname>scm</gname>
|
||||
<dirMode>0700</dirMode>
|
||||
</directory>
|
||||
<directory>
|
||||
<path>/var/log/scm</path>
|
||||
<uname>root</uname>
|
||||
<gname>scm</gname>
|
||||
<dirMode>0770</dirMode>
|
||||
</directory>
|
||||
<directory>
|
||||
<path>/var/lib/scm</path>
|
||||
<uname>scm</uname>
|
||||
<gname>scm</gname>
|
||||
<dirMode>0700</dirMode>
|
||||
</directory>
|
||||
</directories>
|
||||
</mappings>
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
PORT=8080
|
||||
|
||||
# change user
|
||||
# USER=scm
|
||||
USER=scm
|
||||
|
||||
# home of scm-manager
|
||||
SCM_HOME=/var/lib/scm
|
||||
export SCM_HOME=/var/lib/scm
|
||||
|
||||
# alternative jvm path
|
||||
JAVA_HOME="/usr/lib/jvm/jre"
|
||||
|
||||
5
scm-server/src/main/nativepkg/rpm-create-user
Normal file
5
scm-server/src/main/nativepkg/rpm-create-user
Normal file
@@ -0,0 +1,5 @@
|
||||
getent group scm >/dev/null || groupadd -r scm
|
||||
getent passwd scm >/dev/null || \
|
||||
useradd -r -g scm -M -s /sbin/nologin \
|
||||
-c "user for the scm-server process" scm
|
||||
exit 0
|
||||
Reference in New Issue
Block a user