asdf
This commit is contained in:
1 parent
cc41849cf5
commit
f84687d745
22 files changed
+555
-14
No files matched your search
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Runs the contact handler next to nginx. The handler is restarted if it crashes, but not when it
|
||||
# exits for missing configuration (code 78); the static site is served either way.
|
||||
(
|
||||
cd /srv/contact || exit
|
||||
while :; do
|
||||
node contact.mjs
|
||||
code=$?
|
||||
[ "$code" -eq 78 ] && { echo "contact: not started, SMTP is not configured." >&2; exit; }
|
||||
echo "contact: exited with $code, restarting in 5 s." >&2
|
||||
sleep 5
|
||||
done
|
||||
) &
|
||||
|
||||
exec nginx -g 'daemon off;'
|
||||
Reference in new issue
Block a user