1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pihole_ynh.git synced 2024-09-03 20:05:58 +02:00

ynh_add_config

This commit is contained in:
ericgaspar 2021-11-22 12:05:50 +01:00
parent 262eb8a515
commit 48666ada1e
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 11 additions and 8 deletions

View file

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

View file

@ -121,7 +121,7 @@ chown $app:www-data "$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # 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 # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config
@ -129,7 +129,7 @@ ynh_add_nginx_config
#================================================= #=================================================
# PHP-FPM CONFIGURATION # 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 # Create a dedicated php-fpm config
ynh_add_fpm_config --usage=low --footprint=low --dedicated_service 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 # 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 # Find the IP associated to the network interface
localipv4=$(ip address | grep "${main_iface}\$" | awk '{print $2;}' | cut -d/ -f1) 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 # SET UP CONF_REGEN HOOK
#================================================= #=================================================
cp ../conf/dnsmasq_regenconf_hook /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"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/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 systemctl daemon-reload
ynh_exec_warn_less yunohost tools regen-conf dnsmasq ynh_exec_warn_less yunohost tools regen-conf dnsmasq

View file

@ -372,8 +372,10 @@ yunohost service add pihole-FTL --description="PiHole backend service" --log="/v
# UPDATE CONF_REGEN HOOK # UPDATE CONF_REGEN HOOK
#================================================= #=================================================
cp ../conf/dnsmasq_regenconf_hook /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"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/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 systemctl daemon-reload
ynh_exec_warn_less yunohost tools regen-conf dnsmasq ynh_exec_warn_less yunohost tools regen-conf dnsmasq