changed update_svn.sh to remove www/install folder and a few other tweaks

This commit is contained in:
jonnyboy
2013-04-01 13:10:16 -04:00
parent 6334b88fc9
commit e612cca34f
8 changed files with 30 additions and 27 deletions
+4 -3
View File
@@ -2,7 +2,7 @@
require(dirname(__FILE__)."/config.php");
require(WWW_DIR.'/lib/postprocess.php');
$version="0.1r766";
$version="0.1r767";
$db = new DB();
@@ -352,7 +352,8 @@ while( $i > 0 )
printf("$a..");
sleep(1);
}
$rel = $db->query("UPDATE `binaries` SET `procstat`=0,`procattempts`=0,`regexID`=NULL, `relpart`=0,`reltotalpart`=0,`relname`=NULL WHERE procstat not in (4, 6)");
//$rel = $db->query("UPDATE `binaries` SET `procstat`=0,`procattempts`=0,`regexID`=NULL, `relpart`=0,`reltotalpart`=0,`relname`=NULL WHERE procstat not in (4, 6)");
$rel = $db->query("UPDATE binaries SET procstat=0, procattempts=0, regexID=NULL, relpart=0, reltotalpart=0, relname=NULL");
}
//defrag the query cache every 15 minutes
@@ -1099,7 +1100,7 @@ while( $i > 0 )
} elseif (( $array['MAX_LOAD_RELEASES'] >= get_load()) && ( $array['RELEASES'] == "true" ) && ( $optimize_safe_to_run != "true" )) {
$color = get_color();
$log = writelog($panes0[5]);
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:0.5 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes0[5] $ds2 && $mysql_command_2 2>&1 $log && cd $_bin && $_php update_releases.php 2>&1 $log && $mysql_command_2 2>&1 $log && echo \" \033[1;0;33m\" && echo \"sleeping\033[38;5;\"$color\"m {$array['RELEASES_SLEEP']} seconds...\" && sleep {$array['RELEASES_SLEEP']} && $ds1 $panes0[5] $ds3' 2>&1 1> /dev/null");
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:0.5 'echo \"\033[38;5;\"$color\"m\" && $ds1 $panes0[5] $ds2 && cd $_bin && $_php update_releases.php 2>&1 $log && echo \" \033[1;0;33m\" && echo \"sleeping\033[38;5;\"$color\"m {$array['RELEASES_SLEEP']} seconds...\" && sleep {$array['RELEASES_SLEEP']} && $ds1 $panes0[5] $ds3' 2>&1 1> /dev/null");
} elseif (( $array['RELEASES'] == "true" ) && ( $optimize_safe_to_run != "true" ) && ( $array['MAX_LOAD_RELEASES'] <= get_load())) {
$color = get_color();
shell_exec("$_tmux respawnp -t {$array['TMUX_SESSION']}:0.5 'echo \"\033[38;5;\"$color\"m\n$panes0[5] Disabled by MAX_LOAD_RELEASES\" && date +\"%D %T\" && echo \"This is color #$color\"' 2>&1 1> /dev/null");
+3 -3
View File
@@ -61,9 +61,9 @@ 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} {$array['IMPORT_TRUE']}");
echo "[Thread-{$thread}] Completed importing from {$subdir}\n";
echo "\n[Thread-{$thread}] Started importing from {$subdir}\n";
$output = passthru("php {$dir}/{$file} {$subdir} {$array['IMPORT_TRUE']}");
echo "\n[Thread-{$thread}] Completed importing from {$subdir}\n";
}
exit(0);
+12 -12
View File
@@ -84,7 +84,7 @@ export TMUX_SESSION="Ubuntu-02-HOME"
#the monitor script will update itself and each pane, once every 5 seconds plus the lagg time time on the loop the db is queried
#to press the point, the db is not queried any sooner than the time set below, but the script loops each iteration once every 5 seconds
#this makes it more responsive to stop/kill without slamming the db with needless queries, starts are still controlled by the queries
export MONITOR_UPDATE="15"
export MONITOR_UPDATE="5"
#you may want to kill the update_binaries, backfill and import if no releases have been add in x minutes, set the timer to anything other than 0 to enable
#this will only run every 5 loops of monitor
@@ -115,7 +115,7 @@ export BACKFILL_SEQ_TIMER="10"
############################################################
#Choose to run update_binaries true/false
export BINARIES="true"
export BINARIES="trued"
#Choose to run the threaded or non-threaded newznab binaries scripts true/false
#update_binaries.php or update_binaries_threaded.php
@@ -142,7 +142,7 @@ export BINARIES_MAX_ROWS="0"
############################################################
#Choose to run backfill script true/false
export BACKFILL="true"
export BACKFILL="trued"
#Choose to run the threaded or non-threaded newznab backfill scripts true/false
#backfill.php or backfill_threaded.php
@@ -164,7 +164,7 @@ export BACKFILL_MAX_BINS="0"
#Set the max amount of of rows in the parts table and still allow backfill to run
#set to 0 to disable
export BACKFILL_MAX_ROWS="5000000"
export BACKFILL_MAX_ROWS="1200000"
#Set the maximum days to backfill, you set the Newznab+ admin/edit backfill to 1
#this will increment your database by 1 after each backfill loop
@@ -198,7 +198,7 @@ export KEVIN_PARTS="100000"
#Set the path to the nzb dump you downloaded from torrents, this is the path to bulk files folder of nzbs
#this does not recurse through subfolders, unless you set NZB_THREADS to true
export NZBS="/home/jonnyboy/nzb_files2/crap2"
export NZBS="/home/jonnyboy/nzb_files2"
#Choose to run import nzb script true/false
export IMPORT="true"
@@ -251,23 +251,23 @@ export RELEASES_SLEEP="0"
#Choose to run optimize_innodb.php or optimize_mysiam.php script true/false
#set to false by default, you should test the optimize scripts in bin first
#optimize_myisam on small tables runs after every 5th loop of update_releases
export OPTIMIZE="false"
export OPTIMIZE="true"
#optimize can wait, patiently while all other panes stop and then run
#or, forcefully terminate all panes while it runs, to kill all panes and run optimize, enable
export OPTIMIZE_KILL="false"
export OPTIMIZE_KILL="true"
#How often to run optimize_myisam on small tables seconds, default is 10 min
export MYISAM_SMALL="600"
export MYISAM_SMALL="600000"
#How often to run optimize_myisam on large tables seconds, default is 1 hr
export MYISAM_LARGE="3600"
export MYISAM_LARGE="600000"
#How often to run optimize_innodb on small tables in seconds, default is 2 hr
export INNODB_SMALL="7200"
#How often to run optimize_innodb on large tables in seconds, default is 48 hrs
export INNODB_LARGE="172800"
export INNODB_LARGE="14400"
############################################################
@@ -306,7 +306,7 @@ export FIX_DROID="true"
export PAST_24_HOURS="true"
#How often do you want update_parsing.php to run, in seconds. this takes alot of memory and processing time, default is every 12 hrs
export PARSING_TIMER="300"
export PARSING_TIMER="900"
############################################################
@@ -392,7 +392,7 @@ export USE_NMON="false"
export USE_IOTOP="false"
#define tcptrack user settings to apply at runtime
export USE_TCPTRACK="true"
export USE_TCPTRACK="false"
export TRCPTRACK_ARGS="-i eth0 port 563"
#define vnstat user settings to apply at runtim
+7 -7
View File
@@ -51,7 +51,7 @@ bind-address = 127.0.0.1
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 40
thread_cache_size = 20
group_concat_max_len = 8192
tmp_table_size = 512M
@@ -134,13 +134,13 @@ log_error = /var/lib/mysql/error.log
innodb_use_sys_malloc = 1
#threading
innodb_thread_concurrency = 8
innodb_read_io_threads = 4
innodb_write_io_threads = 4
innodb_thread_concurrency = 12
innodb_read_io_threads = 8
innodb_write_io_threads = 8
innodb_purge_threads = 1
#buffer pool related
innodb_buffer_pool_size = 4G
innodb_buffer_pool_size = 2G
innodb_buffer_pool_instances = 8
innodb_change_buffering = all
innodb_max_dirty_pages_pct = 90
@@ -150,9 +150,9 @@ log_error = /var/lib/mysql/error.log
innodb_flush_log_at_trx_commit = 0
#transaction logs
innodb_log_buffer_size = 2G
innodb_log_buffer_size = 1G
innodb_log_files_in_group = 2
innodb_log_file_size = 2G
innodb_log_file_size = 1G
[mysqldump]
quick
View File
+2 -2
View File
@@ -70,12 +70,12 @@ if [[ $CHOWN_TRUE == "true" ]]; then
chmod 775 $NEWZPATH/www/lib/smarty/templates_c
chmod -R 775 $NEWZPATH/www/covers
chmod 775 $NEWZPATH/www
chmod 775 $NEWZPATH/www/install
#chmod 775 $NEWZPATH/www/install
else
chmod 777 $NEWZPATH/www/lib/smarty/templates_c
chmod -R 777 $NEWZPATH/www/covers
chmod 777 $NEWZPATH/www
chmod 777 $NEWZPATH/www/install
#chmod 777 $NEWZPATH/www/install
fi
echo -e "\033[38;5;160mCompleted\033[39m"
Regular → Executable
View File
+2
View File
@@ -28,5 +28,7 @@ svn export --force --username svnplus --password $SVN_PASSWORD svn://svn.newznab
cd $NEWZPATH"/misc/update_scripts"
$PHP update_database_version.php
rm -fr $NEWZPATH"/www/install"
cd $DIR/scripts
./fix_files.sh