Latest script adjustments

This commit is contained in:
dontobi
2023-07-08 08:14:59 +02:00
parent 2359e5118c
commit 52306ee19a
3 changed files with 17 additions and 18 deletions

View File

@@ -143,7 +143,6 @@ if [[ -f /opt/.first_run ]]; then
echo "PACKAGES is set, but OFFLINE_MODE is \"true\". Skipping Linux package installation." echo "PACKAGES is set, but OFFLINE_MODE is \"true\". Skipping Linux package installation."
elif [[ "$packages" != "" ]]; then elif [[ "$packages" != "" ]]; then
echo "PACKAGES is set. Installing the following additional Linux packages: ""$packages" echo "PACKAGES is set. Installing the following additional Linux packages: ""$packages"
#echo "$packages" > /opt/scripts/.docker_config/.packages
bash /opt/scripts/setup_packages.sh -install bash /opt/scripts/setup_packages.sh -install
fi fi
echo " " echo " "
@@ -193,7 +192,7 @@ elif [[ "$(ls *_backupiobroker.tar.gz 2> /dev/null | wc -l)" != "0" && "$(tar -z
echo "IoBroker will start with a fresh installation, while your backup file will be copied into the backup directory." echo "IoBroker will start with a fresh installation, while your backup file will be copied into the backup directory."
echo "You will be able to restore your backup file manually by using the backitup adapter or the containers maintenance script." echo "You will be able to restore your backup file manually by using the backitup adapter or the containers maintenance script."
echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/)." echo "For more information see ioBroker Docker Image Docs (https://docs.buanet.de/iobroker-docker-image/docs/)."
echo ' ' echo " "
echo -n "Copying backup file and restoring initial ioBroker installation... " echo -n "Copying backup file and restoring initial ioBroker installation... "
mv /opt/iobroker/*.tar.gz /opt/ mv /opt/iobroker/*.tar.gz /opt/
tar -xf /opt/initial_iobroker.tar -C / tar -xf /opt/initial_iobroker.tar -C /
@@ -558,13 +557,13 @@ shut_down() {
# pgrep exits with status 1 when there are no matches # pgrep exits with status 1 when there are no matches
while pgrep -u iobroker > /dev/null; (( $? != 1 )); do while pgrep -u iobroker > /dev/null; (( $? != 1 )); do
if (($(date +%s) > timeout)); then if (($(date +%s) > timeout)); then
echo -e '\nTimeout reached. Killing remaining processes...' echo -e "\nTimeout reached. Killing remaining processes... "
pkill --signal SIGKILL -u iobroker pkill --signal SIGKILL -u iobroker
echo "Done. Have a nice day!" echo "Done. Have a nice day!"
exit exit
fi fi
echo -n '.' echo -n "."
sleep 1 sleep 1
done done

View File

@@ -63,7 +63,7 @@ enable_maintenance() {
# undocumented option, only for use with backitup restore scripts # undocumented option, only for use with backitup restore scripts
# stops iobroker by terminating js-controller process by name (the old way) # stops iobroker by terminating js-controller process by name (the old way)
echo "This command will activate maintenance mode and stop js-controller." echo "This command will activate maintenance mode and stop js-controller."
echo "Activating maintenance mode..." echo -n "Activating maintenance mode... "
echo "maintenance" > "$healthcheck" echo "maintenance" > "$healthcheck"
sleep 1 sleep 1
echo "Done." echo "Done."