Increment article number before leaving spoolnews.php if hit limit

This commit is contained in:
Retro_Guy 2021-04-27 21:12:10 -07:00
parent ee86c8209c
commit ec635be396
2 changed files with 8 additions and 8 deletions

View File

@ -5,12 +5,11 @@ spoolpath="/var/spool/rslight"
configpath="/etc/rslight"
username="www"
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9{} | head -c${1:-16};echo;}
site_key=$(randpw)
anonymous_password=$(randpw)
local_password=$(randpw)
admin_password=$(randpw)
admin_key=$(randpw)
site_key=$(/usr/bin/openssl rand -base64 48 | cut -c1-16)
anonymous_password=$(/usr/bin/openssl rand -base64 48 | cut -c1-16)
local_password=$(/usr/bin/openssl rand -base64 48 | cut -c1-16)
admin_password=$(/usr/bin/openssl rand -base64 48 | cut -c1-16)
admin_key=$(/usr/bin/openssl rand -base64 48 | cut -c1-16)
echo
echo "This is the main installation script for Rocksolid Light"

View File

@ -354,10 +354,11 @@ function get_articles($ns, $group) {
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);
$i++;
if($i > $maxarticles_per_run)
break;
$article++;
$local++;
if($i > $maxarticles_per_run) {
break;
}
}
}
$article--;