• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Start Up Scripts

#1
How can I write a script that will run a program ( ~/folding/FAH502 ) everytime the server boots up.

I know that cronjobs can run things at a certain time, but my server isnt important enough to warrant purchasing a UPS so when we have a powercut i need to run around and restart all my running apps. Is there a way I can put these in a script that can be run on system boot?

Ideally I would like a screen session to be opened first, and then the program in question ran. That way I can manage the progress etc remotely without needing local access to the machine.
 
Last edited:

X-Istence

*
Political User
#2
Depending on the linux flavour of the week, create a script in either:

/etc/init.d
/etc/rc.d
/etc/runlevel.d

Or if it is FreeBSD:

/usr/local/etc/rc.d

And just prepend the command to be run by a "screen" and it will be executed in a screen.
 
#3
Thanks X, the flavour is Slackware 10.2 and I have just been speaking to someone on YIM who has said that there is a crontab special flag "@reboot" - I wasn't aware of such flags.

So in that case I have just added the following line to my users crontab

Code:
@reboot screen -d -m ~/folding/FAH504-Linux.exe
I'l have a look at those files also though, just to make myself familiar
 

Members online

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,962
Messages
673,240
Members
89,015
Latest member
loxioalix