mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Adding caddy support
Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
This commit is contained in:
parent
3665a9131c
commit
e077c85d00
6 changed files with 63 additions and 1 deletions
12
snap-src/bin/caddy-control
Executable file
12
snap-src/bin/caddy-control
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# get wekan/mongo settings
|
||||
source $SNAP/bin/wekan-read-settings
|
||||
|
||||
if [ "$CADDY_ENABLED" = "true" ]; then
|
||||
env LC_ALL=C caddy -conf=$SNAP_DATA/Caddyfile -host=localhost:${CADDY_PORT}
|
||||
else
|
||||
snapctl stop caddy-service 2>&1 || true
|
||||
# sleep here, in case snapctl fails to stop service so we do not restart too often
|
||||
sleep 60
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue