2012-12-19, 22:02
(2012-12-19, 06:13)Aenima99x Wrote:(2012-12-18, 21:05)eluSive_NZ Wrote:(2012-12-18, 20:06)wade32505 Wrote: Below are the notes I copied when I setup the screen auto update:
In the nix_scripts directory there is a useful script called newznab_screen.sh that runs update_binaries.php and update_releases.php, in addition to a few other scripts, continuously and automatically. First, we need to modify it however, so lets change dir and make a copy:
cd /var/www/newznab/misc/update_scripts/nix_scripts
cp newznab_screen.sh newznab_screen_local.sh
Now open newznab_screen_local.sh in a text editor and modify NEWZNAB_PATH near the top to point to our installation path:
nano newznab_screen_local.sh
Set NEWZNAB_PATH:
export NEWZNAB_PATH="/var/www/newznab/misc/update_scripts"
Now we can run the script via screen:
screen sh newznab_screen_local.sh
You should see the script download headers for the groups that you have enabled and then run various stages that will attempt to group and catalogue the headers. For now, just leave the script running and detach from screen by typing cntl a d.
You can reattach the screen by first entering 'screen -ls'. This gives your the process number. To reattach you enter 'screen -r [process number].
My newznab is setup on a netbook with 1gig of ram and 160gig of harddrive. It's closed up sitting on a shelf and I access it via ssh.
This is what I did, but used Byobu instead of screen
Byobu is quite handy as you can add stats to the screen e.g. network (u/d), disk io, system load etc etc
When the script seems stuck, you can check the stats quickly to see if it is still "busy"
Why don't you guys just use the init script and run it as a service?
If you mean 'run it as a service' to be to run the script in the terminal when I ssh into it, then I would have to keep that terminal open for it to continue to run, wouldn't I? As it is, it runs continually after I've closed out the terminal and my connection.