mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-14 22:55:11 +00:00
Update qbittorrent.init
This commit is contained in:
parent
ff359c3272
commit
ef2da7689e
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user