-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart
26 lines (19 loc) · 803 Bytes
/
start
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!bin/bash
curl -s $TEGBZN_CONF_URL -o /home/nzbget/nzbget.conf &&
echo 'nzbget config loaded' || { echo 'ERROR: unable to get nzbget config' ; exit 1; }
curl -s $RCONF_URL -o /home/.config/rclone/rclone.conf &&
echo 'rclone config loaded' || { echo 'ERROR: unable to get rclone config' ; exit 1; }
# Rewrites certain options in nzbget.conf:
home='\/home\/nzbget\/maindir\/'
extensions='gclone_pp.py'
formauth='yes'
sed -i \
-e 's/\(ControlPort=\).*/\1'$PORT'/' \
-e 's/\(ControlUsername=\).*/\1'$CTRL_USERNAME'/' \
-e 's/\(ControlPassword=\).*/\1'$CTRL_PASS'/' \
-e 's/\(MainDir=\).*/\1'$home'/' \
-e 's/\(Extensions=\).*/\1'$extensions'/' \
-e 's/\(FormAuth=\).*/\1'$formauth'/' \
/home/nzbget/nzbget.conf
./nzbget/nzbget -o ControlPort=$PORT -D
python3 ping.py