[pkg-bacula-commits] [bacula] 04/04: Use separate variables for user and group
Sven Hartge
hartge-guest at moszumanska.debian.org
Mon Jul 18 09:14:09 UTC 2016
This is an automated email from the git hooks/post-receive script.
hartge-guest pushed a commit to branch systemd-fixuser
in repository bacula.
commit 72eab1afa6d1cba588ca22a91d3c3416c4478afb
Author: Sven Hartge <sven at svenhartge.de>
Date: Mon Jul 18 11:13:15 2016 +0200
Use separate variables for user and group
Using separate variable for the user and the group to allow
starting the config test as the final runtime user as well.
---
debian/bacula-director-db.bacula-director.init.in | 7 ++++---
debian/bacula-fd.init | 7 ++++---
debian/bacula-sd.init | 7 ++++---
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/debian/bacula-director-db.bacula-director.init.in b/debian/bacula-director-db.bacula-director.init.in
index 6a9e615..3661acb 100644
--- a/debian/bacula-director-db.bacula-director.init.in
+++ b/debian/bacula-director-db.bacula-director.init.in
@@ -27,7 +27,8 @@ DAEMON=/usr/sbin/bacula-dir
NAME="bacula-dir"
PORT=9101
DESC="Bacula Director"
-USERGROUP="bacula:bacula"
+BUSER="bacula"
+BGROUP="bacula"
if [ ! -x $DAEMON ] ; then
echo "No bacula-director SQL package installed"
@@ -64,9 +65,9 @@ kill_pid()
do_start()
{
- if $DAEMON -t -c $CONFIG $ARGS > /dev/null 2>&1; then
+ if $DAEMON -u $BUSER -g $BGROUP -t -c $CONFIG > /dev/null 2>&1; then
start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --oknodo --exec $DAEMON --chuid $USERGROUP -- -c $CONFIG
+ --oknodo --exec $DAEMON --chuid $BUSER:$BGROUP -- -c $CONFIG
return 0
else
log_progress_msg "- the configtest"
diff --git a/debian/bacula-fd.init b/debian/bacula-fd.init
index 8ebe074..5ce0e19 100644
--- a/debian/bacula-fd.init
+++ b/debian/bacula-fd.init
@@ -29,7 +29,8 @@ DAEMON=/usr/sbin/bacula-fd
NAME="bacula-fd"
PORT=9102
DESC="Bacula File daemon"
-USERGROUP="root:root"
+BUSER="root"
+BGROUP="root"
test -x $DAEMON || exit 0
@@ -52,9 +53,9 @@ PIDFILE=/var/run/bacula/$NAME.$PORT.pid
do_start()
{
- if $DAEMON -t -c $CONFIG $ARGS > /dev/null 2>&1; then
+ if $DAEMON -u $BUSER -g $BGROUP -t -c $CONFIG > /dev/null 2>&1; then
start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --oknodo --exec $DAEMON --chuid $USERGROUP -- -c $CONFIG
+ --oknodo --exec $DAEMON --chuid $BUSER:$BGROUP -- -c $CONFIG
return 0
else
log_progress_msg "- the configtest"
diff --git a/debian/bacula-sd.init b/debian/bacula-sd.init
index df4ef87..800d352 100644
--- a/debian/bacula-sd.init
+++ b/debian/bacula-sd.init
@@ -27,7 +27,8 @@ DAEMON=/usr/sbin/bacula-sd
NAME="bacula-sd"
PORT=9103
DESC="Bacula Storage daemon"
-USERGROUP="bacula:tape"
+BUSER="bacula"
+BGROUP="tape"
test -x $DAEMON || exit 0
@@ -50,9 +51,9 @@ PIDFILE=/var/run/bacula/$NAME.$PORT.pid
do_start()
{
- if $DAEMON -t -c $CONFIG $ARGS > /dev/null 2>&1; then
+ if $DAEMON -g $BUSER -g $BGROUP -t -c $CONFIG > /dev/null 2>&1; then
start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --oknodo --exec $DAEMON --chuid $USERGROUP -- -c $CONFIG
+ --oknodo --exec $DAEMON --chuid $BUSER:$BGROUP -- -c $CONFIG
return 0
else
log_progress_msg "- the configtest"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git
More information about the pkg-bacula-commits
mailing list