Raised This Month: $32 Target: $400
 8% 

Start daemon from cronjob?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LnG
Junior Member
Join Date: Sep 2006
Old 04-13-2015 , 11:08   Start daemon from cronjob?
Reply With Quote #1

Im trying to follow this guide: https://forums.alliedmods.net/showthread.php?t=99200
I dont have any experience with scripts before and dont really know anything about perl and daemon. Is it possible to start the daemon from cronjobs? or is this something else entirely?

Thanks,
LnG
LnG is offline
neploho
Member
Join Date: Jul 2010
Old 04-20-2015 , 13:30   Re: Start daemon from cronjob?
Reply With Quote #2

My script to check: (stat.sh)

Quote:
#!/bin/bash

ret=$(ps aux | grep [h]lstats.pl | wc -l)

if [ "$ret" -eq 0 ]

then {
echo "Running HLstatsX"
sleep 1
/path_to_stats/scripts/run_hlstats start 1 27500
exit 1
}

else
{
echo "Exit. HLstatsX already running!"
exit 1
}
fi;
Crontab:

Quote:
*/30 * * * * /home/servers/stat.sh
Possibly suitable for your purposes. Can put a certain time. Or periodically to check if the script is running.
neploho is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode