neb/tools/server-update.sh

16 lines
No EOL
296 B
Bash
Executable file

#!/bin/sh
if ! [ "$UID" = "0" ]; then
echo "please perform as root, attempting to escalate privileges..."
exec sudo $(cat /proc/$$/cmdline | sed 's/\x00/ /g')
exit 1
fi
if cd /etc/ixvd/secrets; then
git pull
cd -
fi
sh tools/remove-skel.sh
git pull
sh tools/setup-server.sh