vps-init/data/action.sh
2026-09-26 01:48:54 +09:00

20 lines
302 B
Bash
Executable file

#!/usr/bin/bash
set -euo pipefail
if [ ! -e state ]; then
echo 0 > state
fi
case "$(cat state)" in
0)
./data/setup.sh
;;
1)
./data/install.sh
;;
2)
echo Installed in $(($(date +%s)-$(cat start)))s
rm -r *
exit
esac
echo "$((1+$(cat state)))" > state
reboot
exit 1