runtipi/scripts/system.sh
2022-09-29 18:33:34 +02:00

29 lines
405 B
Bash
Executable file

#!/usr/bin/env bash
source "${BASH_SOURCE%/*}/common.sh"
ensure_pwd
if [ -z ${1+x} ]; then
command=""
else
command="$1"
fi
# Restart Tipi
if [[ "$command" = "restart" ]]; then
echo "Restarting Tipi..."
scripts/stop.sh
scripts/start.sh
exit
fi
# Update Tipi
if [[ "$command" = "update" ]]; then
scripts/stop.sh
git pull origin master
scripts/start.sh
exit
fi