The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
wekan/snap/hooks/configure

26 lines
859 B

#!/bin/bash
exec >> $SNAP_COMMON/hook.log 2>&1
echo "$(date '+%Y-%m-%d %H:%M:%S') $0: Entering hook"
set -x
# read wekan config
. $SNAP/bin/config
# settings were altered by user, safest way to get them applied is to restart service
# first check if caddy service is enabled
value=$(snapctl get caddy-enabled)
if [ "$value" = "true" ]; then
# update caddy file
bind_port=$(snapctl get caddy-bind-port)
port=$(snapctl get port)
[ "x" != "x${bind_port}" ] && sed -i 's|proxy / localhost:.* {|proxy / localhost:'"${bind_port}"' {|g' $SNAP_COMMON/Caddyfile
[ "x" != "x$port" ] && sed -i 's|http://:.*|http://:'"${port}"'|g' $SNAP_COMMON/Caddyfile
snapctl start --enable ${SNAP_NAME}.caddy 2>&1 || true
else
snapctl stop --disable ${SNAP_NAME}.caddy 2>&1 || true
fi
# restart all services
snapctl restart ${SNAP_NAME} 2>&1 || true