From ef2da7689edccd87fd101871eb9060af9cea68a8 Mon Sep 17 00:00:00 2001 From: MarkusMcNugen Date: Sat, 3 Feb 2018 22:32:35 -0500 Subject: [PATCH] Update qbittorrent.init --- qbittorrent/qbittorrent.init | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/qbittorrent/qbittorrent.init b/qbittorrent/qbittorrent.init index 74f215e..f01f660 100644 --- a/qbittorrent/qbittorrent.init +++ b/qbittorrent/qbittorrent.init @@ -13,7 +13,8 @@ # Added log support and cleanup by DementedZA #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. PATH="/sbin:/usr/sbin:/bin:/usr/bin" @@ -24,8 +25,8 @@ PIDFILE="/var/run/$NAME.pid" QBTLOG="/var/log/$NAME.log" DAEMON="/usr/bin/qbittorrent-nox" -DAEMON_ARGS="" -DAEMONSTRING="$DAEMON >> $QBTLOG 2>&1" +DAEMON_ARGS="--profile=/config" +DAEMONSTRING="$DAEMON $DAEMON_ARGS >> $QBTLOG 2>&1" export DBUS_SESSION_BUS_ADDRESS="" @@ -69,9 +70,9 @@ do_start() # 1 if daemon was already running # 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 }