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
f8a5f94714
commit
7901a7c8b8
@ -22,7 +22,8 @@ SCRIPTNAME="/etc/init.d/qbittorrent"
|
|||||||
NAME="qbittorrent-nox"
|
NAME="qbittorrent-nox"
|
||||||
DESC="qBittorrent"
|
DESC="qBittorrent"
|
||||||
PIDFILE="/var/run/$NAME.pid"
|
PIDFILE="/var/run/$NAME.pid"
|
||||||
QBTLOG="/config/qBittorrent/data/logs/qbittorrent-daemon.log"
|
QBTLOGPATH="/config/qBittorrent/data/logs/"
|
||||||
|
QBTLOG="qbittorrent-daemon.log"
|
||||||
|
|
||||||
DAEMON="/usr/bin/qbittorrent-nox"
|
DAEMON="/usr/bin/qbittorrent-nox"
|
||||||
DAEMON_ARGS="--profile=/config"
|
DAEMON_ARGS="--profile=/config"
|
||||||
@ -46,19 +47,25 @@ export DBUS_SESSION_BUS_ADDRESS=""
|
|||||||
do_start()
|
do_start()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#Check if log path exists. If it doesn't exist, create it.
|
||||||
|
if [ ! -e $QBTLOGPATH ]; then
|
||||||
|
mkdir -p $QBTLOGPATH
|
||||||
|
chown -R ${PUID}:${PGID} /config/qBittorrent
|
||||||
|
fi
|
||||||
|
|
||||||
#Check for log file. If it doesn't exist, create it.
|
#Check for log file. If it doesn't exist, create it.
|
||||||
if [ -f $QBTLOG ];
|
if [ -f $QBTLOGPATH$QBTLOG ];
|
||||||
then
|
then
|
||||||
echo "Logging to $QBTLOG."
|
echo "Logging to $QBTLOGPATH$QBTLOG."
|
||||||
else
|
else
|
||||||
echo "Log file $QBTLOG doesn't exist. Creating it..."
|
echo "Log file $QBTLOGPATH$QBTLOG doesn't exist. Creating it..."
|
||||||
touch $QBTLOG
|
touch $QBTLOG
|
||||||
chown $USER:$GROUP $QBTLOG
|
chown $USER:$GROUP $QBTLOGPATH$QBTLOG
|
||||||
if [ -f $QBTLOG ];
|
if [ -f $QBTLOG ];
|
||||||
then
|
then
|
||||||
echo "Logfile created. Logging to $QBTLOG"
|
echo "Logfile created. Logging to $QBTLOGPATH$QBTLOG"
|
||||||
else
|
else
|
||||||
echo "Couldn't create logfile $QBTLOG. Please investigate."
|
echo "Couldn't create logfile $QBTLOGPATH$QBTLOG. Please investigate."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user