Make docker restartable

This commit is contained in:
Johannes Zellner
2018-11-23 15:49:47 +01:00
parent b9c9839bb7
commit 161a8fe2bf
5 changed files with 37 additions and 5 deletions

18
src/scripts/restartdocker.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/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
systemctl restart docker
fi