Wednesday, 8 August 2007

Fedora Startup Scripts

I have a fedora core box which needs to run different scripts on startup to connect to other boxes on the network.

After a bit of fiddling around, I found what appears to be the best solution for me, using ntsysv and init.d. Here's how it's done;

1.) make a new file in the /etc/init.d/ directory
2.) add your script to this file with the following lines at the top;
#!/bin/bash
# chkconfig: 345 85 15
# description: of your file

3.) enter this in the shell;
chkconfig --add startup_filename

4.) type ntsysv - your startup script should now be in the list, checked and ready for action!

It's that easy!

1 comment:

Anonymous said...

Thanks, really helpful!