ericgaspar 4 lat temu
rodzic
commit
48666ada1e
3 zmienionych plików z 11 dodań i 8 usunięć
  1. 0 1
      conf/FTL_3.src
  2. 7 5
      scripts/install
  3. 4 2
      scripts/upgrade

+ 0 - 1
conf/FTL_3.src

@@ -3,4 +3,3 @@ SOURCE_SUM=8c3d55eb3054698172e59ae81b8562ce235d73da461389840da62d90b32f0057
 SOURCE_SUM_PRG=sha256sum
 SOURCE_FORMAT=tar.gz
 SOURCE_IN_SUBDIR=true
-SOURCE_FILENAME=

+ 7 - 5
scripts/install

@@ -121,7 +121,7 @@ chown $app:www-data "$final_path"
 #=================================================
 # NGINX CONFIGURATION
 #=================================================
-ynh_script_progression --message="Configuring nginx web server..." --weight=2
+ynh_script_progression --message="Configuring NGINX web server..." --weight=2
 
 # Create a dedicated nginx config
 ynh_add_nginx_config
@@ -129,7 +129,7 @@ ynh_add_nginx_config
 #=================================================
 # PHP-FPM CONFIGURATION
 #=================================================
-ynh_script_progression --message="Configuring php-fpm..." --weight=2
+ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
 
 # Create a dedicated php-fpm config
 ynh_add_fpm_config --usage=low --footprint=low --dedicated_service
@@ -293,7 +293,7 @@ ynh_store_file_checksum --file="$setupVars"
 #=================================================
 # CONFIGURE DNS FOR THE LOCAL DOMAINS
 #=================================================
-ynh_script_progression --message="Configuring dns for the local domains..." --weight=7
+ynh_script_progression --message="Configuring DNS for the local domains..." --weight=7
 
 # Find the IP associated to the network interface
 localipv4=$(ip address | grep "${main_iface}\$" | awk '{print $2;}' | cut -d/ -f1)
@@ -368,8 +368,10 @@ ynh_exec_warn_less /opt/pihole/gravity.sh
 # SET UP CONF_REGEN HOOK
 #=================================================
 
-cp ../conf/dnsmasq_regenconf_hook /usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app
-ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app"
+ynh_add_config --template="../conf/dnsmasq_regenconf_hook" --destination="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app"
+
+#cp ../conf/dnsmasq_regenconf_hook /usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app
+#ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app"
 
 systemctl daemon-reload
 ynh_exec_warn_less yunohost tools regen-conf dnsmasq

+ 4 - 2
scripts/upgrade

@@ -372,8 +372,10 @@ yunohost service add pihole-FTL --description="PiHole backend service" --log="/v
 # UPDATE CONF_REGEN HOOK
 #=================================================
 
-cp ../conf/dnsmasq_regenconf_hook /usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app
-ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app"
+ynh_add_config --template="../conf/dnsmasq_regenconf_hook" --destination="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app"
+
+#cp ../conf/dnsmasq_regenconf_hook /usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app
+#ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/usr/share/yunohost/hooks/conf_regen/50-dnsmasq_$app"
 
 systemctl daemon-reload
 ynh_exec_warn_less yunohost tools regen-conf dnsmasq