V
V
vaniqq2017-01-27 23:22:23
linux
vaniqq, 2017-01-27 23:22:23

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

2 answer(s)
I
Ivan, 2017-01-27
@LiguidCool

Use Cron.
But in general, the approach looks like sadomaso.

S
sim3x, 2017-01-27
@sim3x

stackoverflow.com/questions/25135897/how-to-automa...
https://www.google.com.ua/search?q=docker+not+auto...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question