Sponsored Content
Full Discussion: Run shell script as a daemon
Top Forums Shell Programming and Scripting Run shell script as a daemon Post 302117800 by radoulov on Wednesday 16th of May 2007 10:58:39 AM
Old 05-16-2007
Or use something like this:

Code:
while :;do
	# your code here
	sleep 30
done

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

applicatoin cannot started, becos daemon did not run

hi, i had an applicatoin which is not running cos one of its daemon is not running.. i get the applicatoin to run by running the daemon first... its manual job... so quite cumbersome.. i have backups in the night, with the crontab -l entry with logs written. the logs indicated successful... (7 Replies)
Discussion started by: yls177
7 Replies

2. UNIX for Dummies Questions & Answers

I would like to know Would you run the ‘identd’ daemon on UNIX servers?

Would you run the ‘identd' daemon on UNIX servers? can you please Explain. thanks in advance! (3 Replies)
Discussion started by: xoxouu
3 Replies

3. Shell Programming and Scripting

shell script as a daemon

hi, can i run a shell script as a daemon ? the shell script looks like this : can this be run as a service ?: thanks regards shann (1 Reply)
Discussion started by: massoo
1 Replies

4. Shell Programming and Scripting

Creating a daemon to run in background

I am trying to create a service to always run and monitor a script that has a tendency to hang, we could not find what is causing it to hang so are in the process of completely reprogramming just about everything, however, that will take upto 6 months. So I need to create this to monitor the... (5 Replies)
Discussion started by: ukndoit
5 Replies

5. Shell Programming and Scripting

run this script as a daemon process

Hi, HI , I have a simple script that moves files from one folder to another folder, I have already done the open-ssh server settings and the script is working fine and is able to transfer the files from one folder to another but right now I myself execute this script by using my creditianls to... (3 Replies)
Discussion started by: nks342
3 Replies

6. Shell Programming and Scripting

script to run as a daemon

Hi, I have one query that is suppose if I have a script that pick up some files from source folder and put it into destination folder , and I want this script to run after every 1 hour, to make it configurable as per that I have options like crontab and nohup but when I test this script I have to... (2 Replies)
Discussion started by: nks342
2 Replies

7. Shell Programming and Scripting

How to make a bash or shell script run as daemon?

Say i have a simple example: root@server # cat /root/scripts/test.sh while sleep 5 do echo "how are u mate" >> /root/scripts/test.log done root@server # Instead of using rc.local to start or another script to check status, I would like make it as daemon, where i can do the following: ... (2 Replies)
Discussion started by: timmywong
2 Replies

8. Shell Programming and Scripting

How to integrate all the systemctl commands into a shell script to verify any daemon/agent service?

Hi, Can we integrate all the systemctl command into a shell script to verify any service with all the options of systemctl if service integrate with the operating system service management tools to deliver their functionality. sudo systemctl start <service_name> sudo systemctl stop... (1 Reply)
Discussion started by: Mannu2525
1 Replies

9. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
SLEEPCTL(1)						      General Commands Manual						       SLEEPCTL(1)

NAME
sleepctl - enable/disable sleepd SYNOPSIS
sleeptcl [on|off|status] DESCRIPTION
sleepctl allows temporarily disabling of the sleepd(8) daemon, by a regular user. This can be useful when you're in the middle of a long download or compile, and don't want the system going to sleep in the middle. "sleepctl off" makes sleepd not put the system to sleep even if it thinks it is idle. If this command is run more than once, the requests stack up, and a like number of "sleepctl on" commands must be run to re-enable sleeping. This may be useful if multiple automated processes or users use the command. Note that the system may still be put to sleep for other reasons, such as a failing battery. "sleepctl on" re-enables sleeping. If sleeping is re-enabled and sleepd has seen no system activity for some time, and has been prevented from putting the system to sleep, it may put the system to sleep immediatly. "sleepctl status" outputs the current status of sleepd. Note that if the system is forced to sleep by other means, sleepd will not remember what mode it was in when it wakes back up, and will return to the default mode of putting the system to sleep after some amount of inactivity. This is by design, so you may easily and natu- rally undo the effects of a "sleepctl off" without remembering to turn it back on. This program communicates with sleepd by writing to the file /var/run/sleepd.ctl. As such, it needs read/write access to that file. It also needs to run as whatever user sleepd runs as, so it can hup the daemon. EXAMPLES
sleepctl off ; wget http://foo/huge.tgz ; sleepctl on SEE ALSO
sleepd(8) http://kitenet.net/~joey/code/sleepd/ AUTHOR
Joey Hess <joey@kitenet.net> SLEEPCTL(1)
All times are GMT -4. The time now is 09:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy