diff --git a/bin/monitor.php b/bin/monitor.php index 5275721d9..aba9465ed 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -42,8 +42,8 @@ $_sleep_string = "\033[1;31msleeping\033[0m "; function get_color() { - $number = mt_rand(1,230); - if ( $number == 16 || $number == 17 ) { get_color(); } + $number = mt_rand(1,231); + if ( $number == 16 || $number == 17 || $number == 52 || $number == 53 ) { get_color(); } return($number); } @@ -347,7 +347,7 @@ while($i>0) if ( $array['NZB_THREADS'] == "true" ){ $nzb_cmd = "$_php nzb-import-sub.php \"{$array['NZBS']}\""; } else { - $nzb_cmd = "$_php nzb-import.php \"{$array['NZBS']}\" true"; + $nzb_cmd = "$_php nzb-import.php \"{$array['NZBS']}\" \"{$array['IMPORT_TRUE']}\""; } //runs update_binaries in 0.9 once if needed and exits diff --git a/bin/nzb-import-sub.php b/bin/nzb-import-sub.php index 295226cf0..996e20f44 100644 --- a/bin/nzb-import-sub.php +++ b/bin/nzb-import-sub.php @@ -58,7 +58,7 @@ if ($ps->RunThreadCode()) $dir = dirname(__FILE__); $file = 'nzb-importonenzb.php'; echo "[Thread-{$thread}] Started importing from {$subdir}\n"; - $output = shell_exec("php {$dir}/{$file} {$subdir} true"); + $output = shell_exec("php {$dir}/{$file} {$subdir} {$array['IMPORT_TRUE']}"); echo "[Thread-{$thread}] Completed importing from {$subdir}\n"; } exit(0); diff --git a/bin/test_defaults.sh b/bin/test_defaults.sh index 3f57f0f98..c6b0b4da0 100644 --- a/bin/test_defaults.sh +++ b/bin/test_defaults.sh @@ -61,3 +61,7 @@ if [ -z "$BINARIES_MAX_ROWS" ]; then export ALLOW_START="false"; fi if [ -z "$BACKFILL_MAX_ROWS" ]; then export ALLOW_START="false"; fi if [ -z "$KILL_PROCESS" ]; then export ALLOW_START="false"; fi if [ -z "NZB_FOLDER_COUNT" ]; then export ALLOW_START="false"; fi +if [ -z "DELETE_PARTS" ]; then export ALLOW_START="false"; fi +if [ -z "IMPORT_TRUE" ]; then export ALLOW_START="false"; fi + + diff --git a/config.sh b/config.sh index 132c92b54..b90c1c7fe 100644 --- a/config.sh +++ b/config.sh @@ -121,6 +121,9 @@ export IMPORT_MAX_RELEASES="0" #set to 0 to disable export IMPORT_MAX_ROWS="0" +#import nzbs using the filename as the release name true/false +export IMPORT_TRUE="false" + ############################################################ #Create releases, this is really only necessary to turn off when you only want to postprocess @@ -158,7 +161,7 @@ export INNODB="false" ############################################################ #Choose to run update_cleanup.php and removespecial.php true/false -#set to false by default, you will need to edit /misc/testing/update_cleanup.php and /misc/testing/removespecial.php +#set to false by default, you will need to edit /misc/testing/update_cleanup.php and /misc/testing/update_parsing.php #to actually do anything, directions are in the file export CLEANUP="false" @@ -199,6 +202,12 @@ export KILL_PROCESS="0" ############################################################ +#Delete parts and binaries older than retention days, which is set in edit - site +#NOT IMPLEMENTED YET +export DELETE_PARTS="true" + +############################################################ + #Specify your SED binary export SED="/bin/sed" #export SED="/usr/local/bin/gsed" diff --git a/scripts/update_svn.sh b/scripts/update_svn.sh index 478ffd04a..acb4d4c7a 100755 --- a/scripts/update_svn.sh +++ b/scripts/update_svn.sh @@ -11,6 +11,7 @@ export NEWZPATH="/var/www/newznab" export PASSWORD="password" svn co --force --username svnplus --password $PASSWORD svn://svn.newznab.com/nn/branches/nnplus $NEWZPATH/ +svn export --force --username svnplus --password $PASSWORD svn://svn.newznab.com/nn/branches/nnplus $NEWZPATH/ cd $NEWZPATH"/misc/update_scripts" php5 update_database_version.php diff --git a/start.sh b/start.sh index c021e043a..1a4246116 100755 --- a/start.sh +++ b/start.sh @@ -17,7 +17,7 @@ fi # Make sure only root can run our script if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root" 1>&2 + echo "This script must be run as root" #This was removed by popular request, so don't complain #exit 1 fi @@ -40,7 +40,7 @@ if [[ $AGREED == "no" ]]; then fi #check if tmux session exists, attach if exists, create new if not exist -if $TMUXCMD has-session -t $TMUX_SESSION; then +if $TMUXCMD -q has-session -t $TMUX_SESSION; then $TMUXCMD attach-session -t $TMUX_SESSION else printf "\033]0; $TMUX_SESSION\007\003\n"