Last active
October 1, 2015 08:27
-
-
Save biiont/e66b5b70a457c19b3434 to your computer and use it in GitHub Desktop.
List, enable and disable rc.d scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here prefx "S" means start, and "K" means stop/kill. | |
# Two digits after mean order of start and kill operations. | |
# I have not found any standard defining this order, | |
# but orders above 90 usually are user scripts. | |
# List installed runlevels | |
ls /etc/rc.d/rc?.d/*someservice | |
# Remove from any runlevels | |
rm /etc/rc.d/rc?.d/*someservice | |
# Install to start and kill at default runlevels | |
for i in 2 3 4 5; do ln -s ../init.d/someservice /etc/rc.d/rc$i.d/S99someservice; done | |
for i in 0 1 6; do ln -s ../init.d/someservice /etc/rc.d/rc$i.d/K99someservice; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment