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
27f192193f
commit
49e1b2f3af
@ -10,13 +10,14 @@
|
|||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# Author: Jesper Smith
|
# Author: Jesper Smith
|
||||||
# Added log support and cleanup by DementedZA
|
# Edited by MarkusMcNugen
|
||||||
|
# Edited log paths for docker, added umask and group to chuid option
|
||||||
|
|
||||||
#Edit the user that qbittorrent-nox will run as.
|
#Edit the user that qbittorrent-nox will run as.
|
||||||
USER=${PUID}
|
USER=${PUID}
|
||||||
GROUP=${PGID}
|
GROUP=${PGID}
|
||||||
|
|
||||||
# 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 /config/qBittorrent/data/logs/qbittorrent-daemon.log by default.
|
||||||
PATH="/sbin:/usr/sbin:/bin:/usr/bin"
|
PATH="/sbin:/usr/sbin:/bin:/usr/bin"
|
||||||
SCRIPTNAME="/etc/init.d/qbittorrent"
|
SCRIPTNAME="/etc/init.d/qbittorrent"
|
||||||
NAME="qbittorrent-nox"
|
NAME="qbittorrent-nox"
|
||||||
@ -24,6 +25,7 @@ DESC="qBittorrent"
|
|||||||
PIDFILE="/var/run/$NAME.pid"
|
PIDFILE="/var/run/$NAME.pid"
|
||||||
QBTLOGPATH="/config/qBittorrent/data/logs/"
|
QBTLOGPATH="/config/qBittorrent/data/logs/"
|
||||||
QBTLOG="qbittorrent-daemon.log"
|
QBTLOG="qbittorrent-daemon.log"
|
||||||
|
UMASK="022"
|
||||||
|
|
||||||
DAEMON="/usr/bin/qbittorrent-nox"
|
DAEMON="/usr/bin/qbittorrent-nox"
|
||||||
DAEMON_ARGS="--profile=/config"
|
DAEMON_ARGS="--profile=/config"
|
||||||
@ -74,9 +76,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:$GROUP --test --quiet --make-pidfile --pidfile $PIDFILE --background --exec /bin/bash -- -c "$DAEMONSTRING" || return 1
|
start-stop-daemon --start --chuid $USER:$GROUP --umask $UMASK --test --quiet --make-pidfile --pidfile $PIDFILE --background --exec /bin/bash -- -c "$DAEMONSTRING" || return 1
|
||||||
|
|
||||||
start-stop-daemon --start --chuid $USER:$GROUP --make-pidfile --pidfile $PIDFILE --background --exec /bin/bash -- -c "$DAEMONSTRING" || return 2
|
start-stop-daemon --start --chuid $USER:$GROUP --umask $UMASK --make-pidfile --pidfile $PIDFILE --background --exec /bin/bash -- -c "$DAEMONSTRING" || return 2
|
||||||
sleep 1
|
sleep 1
|
||||||
echo "[info] Started qBittorrent daemon successfully..." | ts '%Y-%m-%d %H:%M:%.S'
|
echo "[info] Started qBittorrent daemon successfully..." | ts '%Y-%m-%d %H:%M:%.S'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user