init
All checks were successful
CMake on a single platform / build (push) Successful in 11s

This commit is contained in:
2025-10-10 22:01:22 +04:00
commit 07d638e704
5 changed files with 231 additions and 0 deletions

25
server-example.sh.in Normal file
View File

@@ -0,0 +1,25 @@
#!/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