[Pkg-privacy-commits] [onioncat] 256/340: Rename DAEMONUSER to DAEMON_USER for consistency with DAEMON_OPTS.

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:04:45 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository onioncat.

commit 7f075fe27d46d9340f260e0c980fb8c15e454b28
Author: intrigeri <intrigeri at boum.org>
Date:   Thu Aug 18 00:16:50 2011 +0200

    Rename DAEMONUSER to DAEMON_USER for consistency with DAEMON_OPTS.
---
 debian/init.d           | 18 +++++++++---------
 debian/onioncat.default |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/debian/init.d b/debian/init.d
index 390f517..93a69e0 100644
--- a/debian/init.d
+++ b/debian/init.d
@@ -46,7 +46,7 @@ STARTTIME=1             # Time to wait for the server to start, in seconds
                         # when it actually did)
 
 LOGFILE=$LOGDIR/$NAMEL.log
-DAEMONUSER="debian-tor" # Users to run the daemons as. If this value
+DAEMON_USER="debian-tor" # Users to run the daemons as. If this value
                         # is set start-stop-daemon will chuid the server
 
 # Defaults - don't touch, edit /etc/default/onioncat
@@ -71,13 +71,13 @@ fi
 
 # Check that the user exists (if we set a user)
 # Does the user exist?
-if [ -n "$DAEMONUSER" ] ; then
-    if getent passwd | grep -q "^$DAEMONUSER:"; then
+if [ -n "$DAEMON_USER" ] ; then
+    if getent passwd | grep -q "^$DAEMON_USER:"; then
         # Obtain the uid and gid
-        DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'`
-        DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'`
+        DAEMONUID=`getent passwd |grep "^$DAEMON_USER:" | awk -F : '{print $3}'`
+        DAEMONGID=`getent passwd |grep "^$DAEMON_USER:" | awk -F : '{print $4}'`
     else
-        log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist."
+        log_failure_msg "The user $DAEMON_USER, required to run $NAME does not exist."
         exit 1
     fi
 fi
@@ -110,13 +110,13 @@ running() {
 
 start_server() {
 # Start the process using the wrapper
-        if [ -z "$DAEMONUSER" ] ; then
+        if [ -z "$DAEMON_USER" ] ; then
             start_daemon -p $PIDFILE $DAEMON $DAEMON_OPTS
             errcode=$?
         else
 # if we are using a daemonuser then change the user id
             start-stop-daemon --start --quiet --pidfile $PIDFILE \
-                        --exec $DAEMON -- -u $DAEMONUSER -P $PIDFILE $DAEMON_OPTS
+                        --exec $DAEMON -- -u $DAEMON_USER -P $PIDFILE $DAEMON_OPTS
             errcode=$?
         fi
         return $errcode
@@ -124,7 +124,7 @@ start_server() {
 
 stop_server() {
 # Stop the process using the wrapper
-        if [ -z "$DAEMONUSER" ] ; then
+        if [ -z "$DAEMON_USER" ] ; then
             killproc -p $PIDFILE $DAEMON
             errcode=$?
         else
diff --git a/debian/onioncat.default b/debian/onioncat.default
index 178f753..a92bff1 100644
--- a/debian/onioncat.default
+++ b/debian/onioncat.default
@@ -8,7 +8,7 @@
 #ENABLED=0
 
 # User the daemon run as
-DAEMONUSER="debian-tor"
+DAEMON_USER="debian-tor"
 
 # Options passed to onioncat on startup.
 # At least the hidden service hostname must generally be provided.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git



More information about the Pkg-privacy-commits mailing list