Browse Source

fix upgrade and config

Kay0u 4 years ago
parent
commit
4446f8750b
2 changed files with 3 additions and 1 deletions
  1. 1 0
      scripts/config
  2. 2 1
      scripts/upgrade

+ 1 - 0
scripts/config

@@ -17,6 +17,7 @@ source _ynh_add_fpm_config.sh
 app=$YNH_APP_INSTANCE_NAME
 app=$YNH_APP_INSTANCE_NAME
 
 
 fpm_config_dir=$(ynh_app_setting_get --app=$app --key=fpm_config_dir)
 fpm_config_dir=$(ynh_app_setting_get --app=$app --key=fpm_config_dir)
+final_path=$(ynh_app_setting_get --app=$app --key=final_path)
 
 
 #=================================================
 #=================================================
 # SPECIFIC CODE
 # SPECIFIC CODE

+ 2 - 1
scripts/upgrade

@@ -232,10 +232,11 @@ pihole_storage="/etc/pihole"
 if [ "$pihole_version" == "Last 3.X" ]
 if [ "$pihole_version" == "Last 3.X" ]
 then
 then
     cp "$pihole_local_repo/advanced/logrotate" "$pihole_storage/logrotate"
     cp "$pihole_local_repo/advanced/logrotate" "$pihole_storage/logrotate"
+    dnsmasq_user=$(grep DNSMASQ_USER= /etc/init.d/dnsmasq | cut -d'"' -f2)
 else
 else
     cp "$pihole_local_repo/advanced/Templates/logrotate" "$pihole_storage/logrotate"
     cp "$pihole_local_repo/advanced/Templates/logrotate" "$pihole_storage/logrotate"
+    dnsmasq_user=$(grep FTLUSER= /etc/init.d/pihole-FTL | cut -d'=' -f2)
 fi
 fi
-dnsmasq_user=$(grep DNSMASQ_USER= /etc/init.d/dnsmasq | cut -d'"' -f2)
 sed -i "/# su #/d;" "$pihole_storage/logrotate"
 sed -i "/# su #/d;" "$pihole_storage/logrotate"
 
 
 #=================================================
 #=================================================