Submitted by PureLoneWolf on Wed, 03/27/2013 - 05:54
Hi there
I have installed the Tiny Tiny RSS server and want to use the update daemon that it supplies.
I cannot, for the life of me, remember how to make sure that this update daemon runs when the server boots.
Many thanks
Status:
Closed (fixed)
Comments
Submitted by andreychek on Wed, 03/27/2013 - 09:23 Comment #1
Howdy -- if the daemon comes with an init script (as most do), you can have it start on bootup by going into Webmin -> System -> Bootup and Shutdown, and in there check the "At boot" checkbox.
Submitted by PureLoneWolf on Wed, 03/27/2013 - 18:09 Comment #2
Hi there
It doesn't seem to be listed in there.
Is it possible to use the "Create a new bootup and shutdown action" option?
The command I need to use is:
php /home/DOMAIN/domains/SUBDOMAIN/public_html/update.php --daemon
Thanks
Edit also, it really needs to run under a different user than root. Thanks **
Submitted by JamieCameron on Wed, 03/27/2013 - 18:22 Comment #3
Sure, you can do that.
If you want it to run as a different user, change the command to :
su someuser -c "/usr/bin/php /home/DOMAIN/domains/SUBDOMAIN/public_html/update.php --daemon"
Submitted by andreychek on Wed, 03/27/2013 - 18:28 Comment #4
It unfortunately seems as if that particular app wasn't really designed to be run as an init script.
What you may want to do, rather than creating an init script, is just to use cron to handle that.
What you can do is create a cron job, using this particular user to create it (not as root). And when setting up the scheduled cron job, instead of picking something like hourly or daily for when to run, pick "When system boots".
That will make sure this PHP script starts each time the system boots.
Submitted by andreychek on Wed, 03/27/2013 - 18:29 Comment #5
Or you can do what Jamie just said :-)
Submitted by PureLoneWolf on Wed, 03/27/2013 - 18:31 Comment #6
Thanks to you both :)
I followed Jamies option, and the daemon is running perfectly :)
Many many thanks for your help as always guys.
Cheers
Dave
Submitted by JamieCameron on Wed, 03/27/2013 - 18:43 Comment #7
Submitted by Issues on Thu, 04/11/2013 - 19:18 Comment #8
Automatically closed -- issue fixed for 2 weeks with no activity.