mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2026-01-07 00:22:51 +02:00
testing and preparing beta
This commit is contained in:
@@ -8,7 +8,7 @@ then
|
||||
exit 0
|
||||
elif [ "$(cat /opt/iobroker/.docker_config/.healthcheck)" == "maintenance" ]
|
||||
then
|
||||
echo 'Health status: OK - Container running in maintenance mode.'
|
||||
echo 'Health status: OK - Container is running in maintenance mode.'
|
||||
exit 0
|
||||
elif [ "$(ps -fe|grep "[i]obroker.js-controller"|awk '{print $2}')" != "" ]
|
||||
then
|
||||
@@ -16,5 +16,5 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo 'Health status: !!! NOT OK !!! - Something went wrong. Please see Container Logs for more details.'
|
||||
echo 'Health status: !!! NOT OK !!! - Something went wrong. Please see container logs for more details and/or try restarting the container.'
|
||||
exit 1
|
||||
|
||||
@@ -112,8 +112,9 @@ then
|
||||
fi
|
||||
if [ -f /opt/.firstrun ]
|
||||
then
|
||||
echo "Registering maintenance-mode script as command."
|
||||
echo "alias maintenance-mode=\'/opt/scripts/maintenance-mode.sh\'" >> /root/.bashrc
|
||||
echo "Registering maintenance script as command."
|
||||
echo "alias maintenance=\'/opt/scripts/maintenance.sh\'" >> /root/.bashrc
|
||||
rm -f /opt/.firstrun
|
||||
echo "Done."
|
||||
echo ' '
|
||||
fi
|
||||
|
||||
@@ -13,16 +13,17 @@ then
|
||||
fi
|
||||
elif [ "$1" == "on" ]
|
||||
then
|
||||
echo 'This will stop ioBroker and enable maintenance mode for this container.'
|
||||
read -p 'Continue? Type yes or no: ' A
|
||||
if [ "$A" == "y" ] || [ "$A" == "yes" ]
|
||||
echo 'You are going to stop ioBroker and activating maintenance mode for this container.'
|
||||
read -p 'Do you want to continue [yes/no]? ' A
|
||||
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
|
||||
then
|
||||
echo 'Enabling maintenance mode...'
|
||||
echo 'Activating maintenance mode...'
|
||||
echo "maintenance" > /opt/iobroker/.docker_config/.healthcheck
|
||||
sleep 1
|
||||
echo 'Done.'
|
||||
sleep 2
|
||||
echo 'Stopping ioBroker...'
|
||||
pkill -u iobroker
|
||||
sleep 1
|
||||
echo 'Done.'
|
||||
exit 0
|
||||
else
|
||||
@@ -30,12 +31,12 @@ then
|
||||
fi
|
||||
elif [ "$1" == "off" ]
|
||||
then
|
||||
echo 'Depending of the restart policy of this container, this will force it to stop (and restart) immediately.'
|
||||
echo 'Maintenance mode will be disabled after the restart.'
|
||||
read -p 'Continue? Type yes or no: ' A
|
||||
if [ "$A" == "y" ] || [ "$A" == "yes" ]
|
||||
echo 'You are going to deactivate maintenance mode for this container.'
|
||||
echo 'Depending of the restart policy of this container, this will stop/ restart your container immediately.'
|
||||
read -p 'Do you want to continue [yes/no]? ' A
|
||||
if [ "$A" == "y" ] || [ "$A" == "Y" ] || [ "$A" == "yes" ]
|
||||
then
|
||||
echo 'Disabling maintenance mode and forcing container to stop/ restart...'
|
||||
echo 'Deactivating maintenance mode and forcing container to stop/ restart...'
|
||||
echo "maintenance" > /opt/iobroker/.docker_config/.healthcheck
|
||||
pkill -u root
|
||||
exit 0
|
||||
Reference in New Issue
Block a user