Move scripts from update/nix to update, remove nix folder
@@ -1,4 +1,5 @@
|
||||
2017-11-06 DariusIII
|
||||
* Chg: Move scripts from update/nix to update, remove nix folder
|
||||
* Chg: Remove windows scripts
|
||||
* Chg: Update Forking class
|
||||
* Chg: Update ProcessReleases class
|
||||
|
||||
@@ -41,7 +41,7 @@ class TmuxUIStart extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$process = new Process('php misc/update/nix/tmux/start.php');
|
||||
$process = new Process('php misc/update/tmux/start.php');
|
||||
$process->setTty(true);
|
||||
$process->run(function ($type, $buffer) {
|
||||
if (Process::ERR === $type) {
|
||||
|
||||
@@ -45,29 +45,31 @@ class TmuxUIStop extends Command
|
||||
public function handle()
|
||||
{
|
||||
if ($this->argument('type') === 'false' || $this->argument('type') === 'true') {
|
||||
$process = new Process('php misc/update/nix/tmux/stop.php');
|
||||
$process = new Process('php misc/update/tmux/stop.php');
|
||||
$process->setTimeout(600);
|
||||
$process->run(function ($type, $buffer) {
|
||||
if (Process::ERR === $type) {
|
||||
echo 'ERR > '.$buffer;
|
||||
} else {
|
||||
echo $buffer;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
if ($this->argument('type') === 'true') {
|
||||
$sessionName = Tmux::value('tmux_session');
|
||||
$tmuxSession = new Process('tmux kill-session -t '.$sessionName);
|
||||
$this->info('Killing active tmux session: '.$sessionName);
|
||||
$tmuxSession->run(function ($type, $buffer) {
|
||||
$process->run(
|
||||
function ($type, $buffer) {
|
||||
if (Process::ERR === $type) {
|
||||
echo 'ERR > '.$buffer;
|
||||
} else {
|
||||
echo $buffer;
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
if ($this->argument('type') === 'true') {
|
||||
$sessionName = Tmux::value('tmux_session');
|
||||
$tmuxSession = new Process('tmux kill-session -t '.$sessionName);
|
||||
$this->info('Killing active tmux session: '.$sessionName);
|
||||
$tmuxSession->run(
|
||||
function ($type, $buffer) {
|
||||
if (Process::ERR === $type) {
|
||||
echo 'ERR > '.$buffer;
|
||||
} else {
|
||||
echo $buffer;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->error($this->description);
|
||||
|
||||
@@ -30,7 +30,7 @@ export TEST_PATH="${NNTMUX_ROOT}/misc/testing/Releases"
|
||||
export DEV_PATH="${NNTMUX_ROOT}/misc/testing/Dev"
|
||||
export DB_PATH="${NNTMUX_ROOT}/misc/testing/DB"
|
||||
export THREADED_PATH="${NNTMUX_ROOT}/misc/update/python"
|
||||
export MULTI_PATH="${NNTMUX_ROOT}/misc/update/nix/multiprocessing"
|
||||
export MULTI_PATH="${NNTMUX_ROOT}/misc/update/multiprocessing"
|
||||
export NNTMUX_SLEEP_TIME="60" # in seconds
|
||||
|
||||
command -v php5 >/dev/null 2>&1 && export PHP=`command -v php5` || { export PHP=`command -v php`; }
|
||||
@@ -99,7 +99,7 @@ do
|
||||
#
|
||||
## NZB Import
|
||||
# echo "--- Import ---"
|
||||
# $PHP ${MULTI_PATH}/import.php #NZB import - see /misc/update/nix/multiprocessing/import.php for required arguments.
|
||||
# $PHP ${MULTI_PATH}/import.php #NZB import - see /misc/update/multiprocessing/import.php for required arguments.
|
||||
#
|
||||
## Release Processing
|
||||
echo "--- Create Releases ---"
|
||||
@@ -8,8 +8,8 @@ else
|
||||
fi
|
||||
|
||||
export NNTMUX_PATH="${NNTMUX_ROOT}/misc/update"
|
||||
export HELP_PATH="${NNTMUX_ROOT}/misc/update/nix/screen/threaded"
|
||||
export THREAD_PATH="${NNTMUX_ROOT}/misc/update/nix/multiprocessing"
|
||||
export HELP_PATH="${NNTMUX_ROOT}/misc/update/screen/threaded"
|
||||
export THREAD_PATH="${NNTMUX_ROOT}/misc/update/multiprocessing"
|
||||
export TEST_PATH="${NNTMUX_ROOT}/misc/testing"
|
||||
|
||||
command -v php5 >/dev/null 2>&1 && export PHP=`command -v php5` || { export PHP=`command -v php`; }
|
||||
@@ -35,7 +35,7 @@ $show_time = (NN_DEBUG ? '/usr/bin/time' : '');
|
||||
$runVar['commands']['_php'] = $show_time." nice -n{$tmux_niceness} $PHP";
|
||||
$runVar['commands']['_phpn'] = "nice -n{$tmux_niceness} $PHP";
|
||||
$runVar['commands']['_python'] = $show_time." nice -n{$tmux_niceness} $PYTHON";
|
||||
$runVar['commands']['_sleep'] = "{$runVar['commands']['_phpn']} {$runVar['paths']['misc']}update/nix/tmux/bin/showsleep.php";
|
||||
$runVar['commands']['_sleep'] = "{$runVar['commands']['_phpn']} {$runVar['paths']['misc']}update/tmux/bin/showsleep.php";
|
||||
|
||||
//spawn IRCScraper as soon as possible
|
||||
$tRun->runPane('scraper', $runVar);
|
||||
@@ -93,14 +93,14 @@ while ($runVar['counts']['iterations'] > 0) {
|
||||
$runVar['constants']['pre_lim'] = ($runVar['counts']['iterations'] > 1 ? '7' : '');
|
||||
|
||||
//assign scripts
|
||||
$runVar['scripts']['releases'] = "{$runVar['commands']['_php']} {$runVar['paths']['misc']}update/nix/multiprocessing/releases.php";
|
||||
$runVar['scripts']['releases'] = "{$runVar['commands']['_php']} {$runVar['paths']['misc']}update/multiprocessing/releases.php";
|
||||
|
||||
switch ((int) $runVar['settings']['binaries_run']) {
|
||||
case 1:
|
||||
$runVar['scripts']['binaries'] = "{$runVar['commands']['_php']} {$runVar['paths']['misc']}update/nix/multiprocessing/binaries.php 0";
|
||||
$runVar['scripts']['binaries'] = "{$runVar['commands']['_php']} {$runVar['paths']['misc']}update/multiprocessing/binaries.php 0";
|
||||
break;
|
||||
case 2:
|
||||
$runVar['scripts']['binaries'] = "{$runVar['commands']['_php']} {$runVar['paths']['misc']}update/nix/multiprocessing/safe.php binaries";
|
||||
$runVar['scripts']['binaries'] = "{$runVar['commands']['_php']} {$runVar['paths']['misc']}update/multiprocessing/safe.php binaries";
|
||||
break;
|
||||
default:
|
||||
$runVar['scripts']['binaries'] = 0;
|
||||
@@ -108,10 +108,10 @@ while ($runVar['counts']['iterations'] > 0) {
|
||||
|
||||
switch ((int) $runVar['settings']['backfill']) {
|
||||
case 1:
|
||||
$runVar['scripts']['backfill'] = "{$runVar['commands']['_php']} {$runVar['paths']['misc']}update/nix/multiprocessing/backfill.php";
|
||||
$runVar['scripts']['backfill'] = "{$runVar['commands']['_php']} {$runVar['paths']['misc']}update/multiprocessing/backfill.php";
|
||||
break;
|
||||
case 4:
|
||||
$runVar['scripts']['backfill'] = "{$runVar['commands']['_php']} {$runVar['paths']['misc']}update/nix/multiprocessing/safe.php backfill";
|
||||
$runVar['scripts']['backfill'] = "{$runVar['commands']['_php']} {$runVar['paths']['misc']}update/multiprocessing/safe.php backfill";
|
||||
}
|
||||
|
||||
//get usenet connection counts
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -1,5 +1,5 @@
|
||||
# Print out Memory, cpu and load using https://github.com/thewtex/tmux-mem-cpu-load
|
||||
mem_app=$(php ../../../../NNBase.php)/misc/update/nix/tmux/bin/tmux-mem-cpu-load
|
||||
mem_app=$(php ../../../../NNBase.php)/misc/update/tmux/bin/tmux-mem-cpu-load
|
||||
run_segment() {
|
||||
type $mem_app >/dev/null 2>&1
|
||||
if [ "$?" -ne 0 ]; then
|
||||