SABnzbd: add patch to create a proper default config

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-04-17 01:58:31 +02:00
parent 6e8d372f58
commit eb2cec2a62
4 changed files with 34 additions and 228 deletions

View File

@ -1,216 +0,0 @@
__version__ = 18
[misc]
queue_complete = ""
https_port = 8082
folder_rename = 1
allow_64bit_tools = 1
rss_rate = 60
https_key = ""
cleanup_list = ,
cache_limit = 128M
par_option = ""
web_color = gold
replace_spaces = 0
web_color2 = "gold"
dirscan_speed = 5
enable_filejoin = 1
create_group_folders = 0
api_key = @API_KEY@
no_penalties = 0
bandwidth_limit = 0
dirscan_dir = /storage/downloads/watch/
disable_api_key = 0
email_to = ,
password = ""
permissions = ""
auto_disconnect = 1
enable_date_sorting = 0
replace_dots = 0
movie_sort_extra = -cd%1
ionice = -c2 -n4
enable_unzip = 1
download_free = 1G
port = 8081
email_dir = ""
email_full = 0
log_dir = logs
admin_dir = admin
nzb_backup_dir = ""
tv_sort_countries = 1
date_categories = tv,
ssl_type = v23
date_sort_string = ""
schedlines = ,
host = 0.0.0.0
ignore_samples = 2
enable_tsjoin = 1
auto_browser = 0
pause_on_post_processing = 1
enable_unrar = 1
email_account = ""
email_server = ""
config_lock = 0
api_warnings = 1
tv_sort_string = ""
dirscan_priority = 0
username = ""
download_dir = /storage/downloads/incoming/
size_limit = ""
enable_par_cleanup = 1
safe_postproc = 1
cache_dir = cache
complete_dir = /storage/downloads/
replace_illegal = 1
par2_multicore = 0
warned_old_queue = 0
language = us-en
check_new_rel = 0
enable_https = 0
no_dupes = 0
top_only = 1
quick_check = 1
movie_sort_string = ""
email_from = ""
movie_extra_folder = 0
dirscan_script = ""
email_endjob = 0
tv_categories = ,
unpack_check = 1
login_realm = SABnzbd
send_group = 0
refresh_rate = 0
movie_categories = movies,
script_dir = ""
email_pwd = ""
ignore_wrong_unrar = 0
nice = ""
enable_movie_sorting = 0
https_cert = ""
web_dir2 = ""
fail_on_crc = 0
auto_sort = 0
dirscan_opts = 3
web_dir = smpl
queue_complete_pers = 0
enable_tv_sorting = 0
folder_max_length = 256
[logging]
max_log_size = 1282880
log_level = 0
log_backups = 1
enable_cherrypy_logging = 0
[newzbin]
username = ""
https = 1
bookmark_rate = 60
bookmarks = 0
password = ""
unbookmark = 1
[nzbmatrix]
username = ""
apikey = ""
[categories]
[[misc]]
priority = -100
pp = ""
name = misc
script = Default
newzbin = Misc
dir = Misc
[[tv]]
priority = -100
pp = ""
name = tv
script = Default
newzbin = TV
dir = TV
[[unknown]]
priority = -100
pp = ""
name = unknown
script = Default
newzbin = Unknown
dir = Unknown
[[resources]]
priority = -100
pp = ""
name = resources
script = Default
newzbin = Resources
dir = Resources
[[apps]]
priority = -100
pp = ""
name = apps
script = Default
newzbin = Apps
dir = Apps
[[movies]]
priority = -100
pp = ""
name = movies
script = Default
newzbin = Movies
dir = Movies
[[consoles]]
priority = -100
pp = ""
name = consoles
script = Default
newzbin = Consoles
dir = Consoles
[[books]]
priority = -100
pp = ""
name = books
script = Default
newzbin = Books
dir = Books
[[games]]
priority = -100
pp = ""
name = games
script = Default
newzbin = Games
dir = Games
[[anime]]
priority = -100
pp = ""
name = anime
script = Default
newzbin = Anime
dir = Anime
[[music]]
priority = -100
pp = ""
name = music
script = Default
newzbin = Music
dir = Music
[[pda]]
priority = -100
pp = ""
name = pda
script = Default
newzbin = PDA
dir = PDA
[[emulation]]
priority = -100
pp = ""
name = emulation
script = Default
newzbin = Emulation
dir = Emulation
[servers]
[[localhost:119]]
username = ""
enable = 1
name = localhost:119
fillserver = 0
connections = 8
ssl = 0
host = localhost
timeout = 120
password = ""
optional = 0
port = 119

View File

@ -22,7 +22,6 @@
#
# runlevels: openelec, textmode
(
if [ -f /var/config/settings.conf ]; then
. /var/config/settings.conf
@ -37,16 +36,7 @@
wait_for_network
progress "Starting SABnzbd Newsgroup downloader daemon"
if [ ! -f $HOME/.sabnzbd/sabnzbd.conf ]; then
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
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
fi
fi
)&

View File

@ -24,7 +24,6 @@
mkdir -p $INSTALL/usr/lib/$1
cp -PR $PKG_BUILD/* $INSTALL/usr/lib/$1
cp $PKG_DIR/config/sabnzbd.config $INSTALL/usr/lib/$1
mkdir -p $INSTALL/etc/avahi/services
cp $PKG_DIR/config/sabnzbd-http.service $INSTALL/etc/avahi/services

View File

@ -0,0 +1,33 @@
diff -Naur SABnzbd-0.6.0RC2/sabnzbd/constants.py SABnzbd-0.6.0RC2.patch/sabnzbd/constants.py
--- SABnzbd-0.6.0RC2/sabnzbd/constants.py 2011-04-10 16:06:27.000000000 +0200
+++ SABnzbd-0.6.0RC2.patch/sabnzbd/constants.py 2011-04-16 21:49:52.858788377 +0200
@@ -70,8 +70,8 @@
DB_HISTORY_NAME = 'history%s.db' % DB_HISTORY_VERSION
DB_QUEUE_NAME = 'queue%s.db' % DB_QUEUE_VERSION
-DEF_DOWNLOAD_DIR = 'Downloads/incomplete'
-DEF_COMPLETE_DIR = 'Downloads/complete'
+DEF_DOWNLOAD_DIR = '/storage/downloads/incoming/'
+DEF_COMPLETE_DIR = '/storage/downloads/'
DEF_CACHE_DIR = 'cache'
DEF_ADMIN_DIR = 'admin'
DEF_LOG_DIR = 'logs'
@@ -83,12 +83,12 @@
DEF_STDINTF = 'smpl'
DEF_SKIN_COLORS = {'smpl':'white', 'classic':'darkblue', 'mobile':'light', 'plush' : 'gold'}
DEF_MAIN_TMPL = 'templates/main.tmpl'
-DEF_INI_FILE = 'sabnzbd.ini'
-DEF_HOST = 'localhost'
-DEF_PORT_WIN = 8080
-DEF_PORT_UNIX = 8080
-DEF_PORT_WIN_SSL = 9090
-DEF_PORT_UNIX_SSL= 9090
+DEF_INI_FILE = 'sabnzbd.conf'
+DEF_HOST = '0.0.0.0'
+DEF_PORT_WIN = 8081
+DEF_PORT_UNIX = 8081
+DEF_PORT_WIN_SSL = 9081
+DEF_PORT_UNIX_SSL= 9081
DEF_WORKDIR = 'sabnzbd'
DEF_LOG_FILE = 'sabnzbd.log'
DEF_LOG_ERRFILE = 'sabnzbd.error.log'