Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
buanet committed Aug 4, 2021
1 parent 7f31993 commit 0aba419
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions amd64/scripts/maintenance.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
#!/bin/bash

# function to display help text
display_help() {
echo "This script is build to manage your ioBroker container!"
echo "Usage: maintenance [ COMMAND ] [ OPTIONS ]"
echo " maint [ COMMAND ] [ OPTIONS ]"
echo ''
echo "COMMANDS"
echo "------------------"
echo " status > gives the current state of maintenance mode"
echo " on > switches mantenance mode ON"
echo " off > switches mantenance mode OFF and shuts down/ restarts container"
echo " upgrade > will put container to maintenance mode and upgrade iobroker"
echo ''
echo "OPTIONS"
echo "------------------"
echo " -h|--help > shows this help"
echo " -y|--yes > confirms the used command without asking"
echo ''
exit 0
}

while getopts h opt
do
case $opt in
h | --help)
display_help ;;
esac
exit 0;
done

if [ "$1" == "status" ]
then
if [ $(cat /opt/scripts/.docker_config/.healthcheck) == 'maintenance' ]
Expand Down

0 comments on commit 0aba419

Please sign in to comment.