mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2026-01-03 22:53:04 +02:00
some testing
This commit is contained in:
@@ -439,9 +439,6 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
|
|
||||||
#####
|
#####
|
||||||
# Starting ioBroker
|
# Starting ioBroker
|
||||||
#####
|
#####
|
||||||
@@ -452,7 +449,19 @@ echo ' '
|
|||||||
echo "Starting ioBroker..."
|
echo "Starting ioBroker..."
|
||||||
echo ' '
|
echo ' '
|
||||||
|
|
||||||
exec gosu iobroker node node_modules/iobroker.js-controller/controller.js
|
# Function for graceful shutdown by SIGTERM signal
|
||||||
|
shut_down() {
|
||||||
|
echo ' '
|
||||||
|
echo "Recived termination signal (SIGTERM)."
|
||||||
|
echo "Shutting down ioBroker..."
|
||||||
|
pid=$(ps -ef | awk '/[j]s.controller/{print $2}')
|
||||||
|
kill -SIGTERM "$pid"
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
trap 'shut_down' SIGTERM
|
||||||
|
|
||||||
|
gosu iobroker node node_modules/iobroker.js-controller/controller.js & wait
|
||||||
|
|
||||||
# Preventing container restart by keeping a process alive even if iobroker will be stopped
|
# Preventing container restart by keeping a process alive even if iobroker will be stopped
|
||||||
tail -f /dev/null
|
tail -f /dev/null
|
||||||
|
|||||||
Reference in New Issue
Block a user