All checks were successful
CMake on a single platform / build (push) Successful in 11s
26 lines
531 B
Bash
26 lines
531 B
Bash
#!/bin/bash
|
|
|
|
pid=''
|
|
run=true
|
|
|
|
start() {
|
|
@CMAKE_INSTALL_FULL_BINDIR@/@PROJECT_NAME@ \
|
|
--docroot='/var/empty;/favicon.ico,/resources,/style,/node_modules' \
|
|
--http-address 0.0.0.0 --http-port 8087 \
|
|
--config /etc/Wt/wt_config.xml \
|
|
--resources-dir /usr/share/Wt/resources &> >(logger --tag @PROJECT_NAME@) & pid="$!"
|
|
}
|
|
|
|
shutdown() {
|
|
run=false
|
|
(( $pid )) && kill "$pid"
|
|
}
|
|
|
|
trap shutdown EXIT
|
|
|
|
start
|
|
while $run
|
|
do
|
|
wait "$pid" || { logger --tag @PROJECT_NAME@ -p 3 "restarting server after error"; start; }
|
|
done
|