Update qbittorrent.init

This commit is contained in:
MarkusMcNugen 2018-02-03 22:32:35 -05:00 committed by GitHub
parent ff359c3272
commit ef2da7689e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,8 @@
# Added log support and cleanup by DementedZA # Added log support and cleanup by DementedZA
#Edit the user that qbittorrent-nox will run as. #Edit the user that qbittorrent-nox will run as.
USER="qbtuser" USER="nobody"
GROUP="users"
# No need to edit these. Logging is sent to /var/log/qbittorrent-nox.log by default. # No need to edit these. Logging is sent to /var/log/qbittorrent-nox.log by default.
PATH="/sbin:/usr/sbin:/bin:/usr/bin" PATH="/sbin:/usr/sbin:/bin:/usr/bin"
@ -24,8 +25,8 @@ PIDFILE="/var/run/$NAME.pid"
QBTLOG="/var/log/$NAME.log" QBTLOG="/var/log/$NAME.log"
DAEMON="/usr/bin/qbittorrent-nox" DAEMON="/usr/bin/qbittorrent-nox"
DAEMON_ARGS="" DAEMON_ARGS="--profile=/config"
DAEMONSTRING="$DAEMON >> $QBTLOG 2>&1" DAEMONSTRING="$DAEMON $DAEMON_ARGS >> $QBTLOG 2>&1"
export DBUS_SESSION_BUS_ADDRESS="" export DBUS_SESSION_BUS_ADDRESS=""
@ -69,9 +70,9 @@ do_start()
# 1 if daemon was already running # 1 if daemon was already running
# 2 if daemon could not be started # 2 if daemon could not be started
start-stop-daemon --start --chuid $USER --test --quiet --make-pidfile --pidfile $PIDFILE --background --exec /bin/bash -- -c "$DAEMONSTRING" || return 1 start-stop-daemon --start --chuid $USER:$GROUP --test --quiet --make-pidfile --pidfile $PIDFILE --background --exec /bin/bash -- -c "$DAEMONSTRING" || return 1
start-stop-daemon --start --chuid $USER --make-pidfile --pidfile $PIDFILE --background --exec /bin/bash -- -c "$DAEMONSTRING" || return 2 start-stop-daemon --start --chuid $USER:$GROUP --make-pidfile --pidfile $PIDFILE --background --exec /bin/bash -- -c "$DAEMONSTRING" || return 2
sleep 1 sleep 1
} }