From 0d40db44d4f599b5abd251c97702f45632b7a793 Mon Sep 17 00:00:00 2001 From: oiseauroch Date: Thu, 13 Oct 2022 15:30:28 +0200 Subject: [PATCH] add regen_conf hook --- hooks/post_conf_regen | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 hooks/post_conf_regen diff --git a/hooks/post_conf_regen b/hooks/post_conf_regen new file mode 100644 index 0000000..fc17803 --- /dev/null +++ b/hooks/post_conf_regen @@ -0,0 +1,10 @@ +#!/bin/bash + +source /usr/share/yunohost/helpers + + +action=$1 +domain=__DOMAIN__ + +ynh_replace_string --match_string="server_name $domain" --replace_string="server_name $domain *.$domain" --target_file="/etc/nginx/conf.d/$domain.conf" +ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.conf"