rc.local fix

This commit is contained in:
Erik Bergström 2018-05-08 10:17:44 +02:00
parent 7016e5218d
commit 50a6502fbd

View file

@ -55,6 +55,13 @@ if ! test -d /var/cache/cosmos/repo; then
cosmos clone "$cmd_repo"
fi
if [ ! -f /etc/rc.local ]; then
echo "#!/bin/bash" > /etc/rc.local
echo > /etc/rc.local
chmod +x /etc/rc.local
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