Answer the question
In order to leave comments, you need to log in
How to execute commands on OS boot?
Hello! I want to run commands every 5 seconds when the system boots. Please tell me, did I do it right?
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
service ssh restart
sleep 5;
service proftpd restart
sleep 5;
service mysql restart
exit 0
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question