diff --git a/lib/functions.sh b/lib/functions.sh index 2eb79a0..f60463c 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -1495,7 +1495,9 @@ get_appvars() { WEBHOOK_SECRET=$(cat /federated/apps/gitea/.webhook.secret) else WEBHOOK_SECRET=$(create_password) - echo "$WEBHOOK_SECRET" > /federated/apps/gitea/.webhook.secret + if [[ -d "/federated/apps/gitea" ]]; then + echo "$WEBHOOK_SECRET" > /federated/apps/gitea/.webhook.secret + fi fi # Get LDAP DOMAIN from ldap its self and setup variables for each part