mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-25 17:54:11 +02:00
some testing
This commit is contained in:
@@ -439,9 +439,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
sleep 5
|
||||
|
||||
|
||||
#####
|
||||
# Starting ioBroker
|
||||
#####
|
||||
@@ -452,7 +449,19 @@ echo ' '
|
||||
echo "Starting ioBroker..."
|
||||
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
|
||||
tail -f /dev/null
|
||||
|
||||
Reference in New Issue
Block a user