DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Fedora Start-up Scripts

05.15.2008
| 16570 views |
  • submit to reddit
        // description of your code here

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!