ubuntu 18.04 doesn't seem to have /etc/rc.local anymore

This commit is contained in:
Fredrik Thulin 2018-05-03 12:33:31 +02:00
parent 3e571b6e80
commit f4a19dfad3
No known key found for this signature in database
GPG key ID: 2707330D4030CCAD

View file

@ -55,6 +55,7 @@ if ! test -d /var/cache/cosmos/repo; then
cosmos clone "$cmd_repo"
fi
if [ -f /etc/rc.local ]; then
# re-run cosmos at reboot until it succeeds - use bash -l to get working proxy settings
grep -v "^exit 0" /etc/rc.local > /etc/rc.local.new
(echo ""
@ -63,6 +64,7 @@ grep -v "^exit 0" /etc/rc.local > /etc/rc.local.new
echo "exit 0"
) >> /etc/rc.local.new
mv -f /etc/rc.local.new /etc/rc.local
fi
touch /etc/run-cosmos-at-boot