How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

January 24, 2019

Ubuntu rc-local

Filed under: Linux — Tags: , — admin @ 11:55 am

On a ubuntu 18 I try to reboot a service after it start so I was try to use rc.local but this is no longer there .

So you create this file


You add into it this

Description=/etc/rc.local Compatibility

ExecStart=/etc/rc.local start


Then make the file chmod +x /etc/rc.local

and add

#!/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.

exit 0

Final step is to enable the service

systemctl enable rc-local

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress