Increment article number before leaving spoolnews.php if hit limit
This commit is contained in:
parent
ee86c8209c
commit
ec635be396
|
@ -5,12 +5,11 @@ spoolpath="/var/spool/rslight"
|
||||||
configpath="/etc/rslight"
|
configpath="/etc/rslight"
|
||||||
username="www"
|
username="www"
|
||||||
|
|
||||||
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9{} | head -c${1:-16};echo;}
|
site_key=$(/usr/bin/openssl rand -base64 48 | cut -c1-16)
|
||||||
site_key=$(randpw)
|
anonymous_password=$(/usr/bin/openssl rand -base64 48 | cut -c1-16)
|
||||||
anonymous_password=$(randpw)
|
local_password=$(/usr/bin/openssl rand -base64 48 | cut -c1-16)
|
||||||
local_password=$(randpw)
|
admin_password=$(/usr/bin/openssl rand -base64 48 | cut -c1-16)
|
||||||
admin_password=$(randpw)
|
admin_key=$(/usr/bin/openssl rand -base64 48 | cut -c1-16)
|
||||||
admin_key=$(randpw)
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "This is the main installation script for Rocksolid Light"
|
echo "This is the main installation script for Rocksolid Light"
|
||||||
|
|
|
@ -354,10 +354,11 @@ function get_articles($ns, $group) {
|
||||||
echo "\nRetrieved: ".$group." ".$article."\n";
|
echo "\nRetrieved: ".$group." ".$article."\n";
|
||||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Wrote to spool: ".$CONFIG['remote_server']." ".$group.":".$article, FILE_APPEND);
|
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Wrote to spool: ".$CONFIG['remote_server']." ".$group.":".$article, FILE_APPEND);
|
||||||
$i++;
|
$i++;
|
||||||
if($i > $maxarticles_per_run)
|
|
||||||
break;
|
|
||||||
$article++;
|
$article++;
|
||||||
$local++;
|
$local++;
|
||||||
|
if($i > $maxarticles_per_run) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$article--;
|
$article--;
|
||||||
|
|
Loading…
Reference in New Issue