Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Use systemd instead of /etc/rc.local to start script #15

Open
decantr opened this issue Apr 25, 2019 · 1 comment
Open

Use systemd instead of /etc/rc.local to start script #15

decantr opened this issue Apr 25, 2019 · 1 comment

Comments

@decantr
Copy link
Owner

decantr commented Apr 25, 2019

The current method of auto starting the setup script is through the rc.local file.

Appending to this before the exit 0 is not recomended as the file states at the top "Make sure that the script will exit 0" which we can ensure will happen if our script fails.

Ideally we would be using a systemd service to run the setup script on startup.
This has the added benefit of allowing the "wait for network" option so it only runs once the interface is up.

@decantr
Copy link
Owner Author

decantr commented Apr 25, 2019

Running the command seems to be the way to go about "systemctl enable" without being logged in.
sudo ln -s /etc/systemd/system/rgu-h-setup.service /etc/systemd/system/multi-user.target.wants/rgu-h-setup.service

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant