mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
0c9ea4fe43
it is not necessary to run reset_truncate.php in order to second nntp provider for postprocessing only
27 lines
1.1 KiB
PHP
27 lines
1.1 KiB
PHP
<?php
|
|
require(dirname(__FILE__)."/../bin/config.php");
|
|
require_once(WWW_DIR."/lib/framework/db.php");
|
|
|
|
$db = new DB;
|
|
|
|
$rel = $db->query("update groups set backfill_target=0, first_record=0, first_record_postdate=null, last_record=0, last_record_postdate=null, last_updated=null");
|
|
$rel = $db->query("truncate table parts");
|
|
$rel = $db->query("truncate table partsrepair");
|
|
$rel = $db->query("truncate table binaries;");
|
|
|
|
//get variables from config.sh and defaults.sh
|
|
$path = dirname(__FILE__);
|
|
$varnames = shell_exec("cat ".$path."/../config.sh | grep ^export | cut -d \= -f1 | awk '{print $2;}'");
|
|
$varnames .= shell_exec("cat ".$path."/../defaults.sh | grep ^export | cut -d \= -f1 | awk '{print $2;}'");
|
|
$vardata = shell_exec("cat ".$path."/../config.sh | grep ^export | cut -d \\\" -f2 | awk '{print $1;}'");
|
|
$vardata .= shell_exec("cat ".$path."/../defaults.sh | grep ^export | cut -d \\\" -f2 | awk '{print $1;}'");
|
|
$varnames = explode("\n", $varnames);
|
|
$vardata = explode("\n", $vardata);
|
|
$array = array_combine($varnames, $vardata);
|
|
unset($array['']);
|
|
|
|
$TESTING="{$array['NEWZPATH']}{$array['TESTING_PATH']}";
|
|
passthru("cd $TESTING && php spotnab.php -r");
|
|
|
|
?>
|