-
Notifications
You must be signed in to change notification settings - Fork 1
Run bash commands on Startup
lhmerino edited this page Jul 30, 2019
·
3 revisions
- Your script named "team_script"
- This can be a custom script or the firewall rule script
echo -e '#!/bin/sh -e\n\n' > /etc/rc.local
chmod a+x /etc/rc.local
-
echo -e '<path_to_script><team_script>\n\n' >> /etc/rc.local
- Make sure to place a "/" between path_to_script and team_script
-
chmod a+x <path_to_script><team_script>
- Make sure to place a "/" between path_to_script and team_script
If there are a series of commands and one of the commands returns an error, then any commands, if any, below the failed command will not execute. To resolve this issue use || true
after each command when possible. For example:
echo hello || true
pct start 101 || true
pct mount 101 || true