changed update_svn to checkou and overwite to make all files current, removed 2 more dark purples from color list, added option to set true for imports

This commit is contained in:
jonnyboy
2013-02-10 05:22:44 +01:00
parent 47beac215d
commit 0b3e6536e3
6 changed files with 21 additions and 7 deletions
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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);
+4
View File
@@ -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
+10 -1
View File
@@ -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"
+1
View File
@@ -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
+2 -2
View File
@@ -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"