Files
cloudron-box/src/scripts/reboot.sh
Johannes Zellner dd75cdb37e Don't explicitly sync the filesystems on reboot
This will happen during unmount anyways but will first terminate all
processes
2020-09-25 19:11:15 +02:00

19 lines
277 B
Bash
Executable File

#!/bin/bash
set -eu -o pipefail
if [[ ${EUID} -ne 0 ]]; then
echo "This script should be run as root." > /dev/stderr
exit 1
fi
if [[ $# == 1 && "$1" == "--check" ]]; then
echo "OK"
exit 0
fi
if [[ "${BOX_ENV}" == "cloudron" ]]; then
shutdown -r now
fi