mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-10 11:27:49 +00:00
SABnzbd: create and add random apikey on first start
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
@@ -15,11 +15,11 @@ __version__ = 18
|
|||||||
dirscan_speed = 5
|
dirscan_speed = 5
|
||||||
enable_filejoin = 1
|
enable_filejoin = 1
|
||||||
create_group_folders = 0
|
create_group_folders = 0
|
||||||
api_key = 2f6c67ec869e65df6962d830a5ad8eab
|
api_key = @API_KEY@
|
||||||
no_penalties = 0
|
no_penalties = 0
|
||||||
bandwidth_limit = 0
|
bandwidth_limit = 0
|
||||||
dirscan_dir = /storage/downloads/watch/
|
dirscan_dir = /storage/downloads/watch/
|
||||||
disable_api_key = 1
|
disable_api_key = 0
|
||||||
email_to = ,
|
email_to = ,
|
||||||
password = ""
|
password = ""
|
||||||
permissions = ""
|
permissions = ""
|
||||||
@@ -202,14 +202,14 @@ __version__ = 18
|
|||||||
newzbin = Emulation
|
newzbin = Emulation
|
||||||
dir = Emulation
|
dir = Emulation
|
||||||
[servers]
|
[servers]
|
||||||
[[change_me_first:119]]
|
[[localhost:119]]
|
||||||
username = ""
|
username = ""
|
||||||
enable = 1
|
enable = 1
|
||||||
name = change_me_first:119
|
name = localhost:119
|
||||||
fillserver = 0
|
fillserver = 0
|
||||||
connections = 8
|
connections = 8
|
||||||
ssl = 0
|
ssl = 0
|
||||||
host = change_me_first
|
host = localhost
|
||||||
timeout = 120
|
timeout = 120
|
||||||
password = ""
|
password = ""
|
||||||
optional = 0
|
optional = 0
|
||||||
|
@@ -37,6 +37,10 @@
|
|||||||
if [ ! -f $HOME/.sabnzbd/sabnzbd.conf ]; then
|
if [ ! -f $HOME/.sabnzbd/sabnzbd.conf ]; then
|
||||||
mkdir -p $HOME/.sabnzbd
|
mkdir -p $HOME/.sabnzbd
|
||||||
cp /usr/lib/SABnzbd/sabnzbd.config $HOME/.sabnzbd/sabnzbd.conf
|
cp /usr/lib/SABnzbd/sabnzbd.config $HOME/.sabnzbd/sabnzbd.conf
|
||||||
|
|
||||||
|
# create api key
|
||||||
|
API_KEY=`cat /dev/urandom |od -N16 -tx1 |cut -c8- |tr -d ' \n'`
|
||||||
|
sed -e "s,@API_KEY@,$API_KEY,g" -i $HOME/.sabnzbd/sabnzbd.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
python /usr/lib/SABnzbd/SABnzbd.py -d -f $HOME/.sabnzbd/sabnzbd.conf -l 0 > /dev/null 2>&1
|
python /usr/lib/SABnzbd/SABnzbd.py -d -f $HOME/.sabnzbd/sabnzbd.conf -l 0 > /dev/null 2>&1
|
||||||
|
Reference in New Issue
Block a user