File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,6 +149,12 @@ ftl_config() {
149149 setup_web_password
150150}
151151
152+ ftl_cleanup (){
153+ FTL_PID_FILE=" $( getFTLConfigValue files.pid) "
154+ # Cleanup
155+ rm -f /run/pihole/FTL.sock /dev/shm/FTL-* " ${FTL_PID_FILE} "
156+ }
157+
152158migrate_v5_configs () {
153159 # Previously, Pi-hole created a number of files in /etc/dnsmasq.d
154160 # During migration, their content is copied into the new single source of
Original file line number Diff line number Diff line change @@ -53,8 +53,7 @@ start() {
5353
5454 echo " [i] pihole-FTL pre-start checks"
5555 # Remove possible leftovers from previous pihole-FTL processes
56- rm -f /dev/shm/FTL-* 2> /dev/null
57- rm -f /run/pihole/FTL.sock
56+ ftl_cleanup
5857
5958 fix_capabilities
6059 sh /opt/pihole/pihole-FTL-prestart.sh
@@ -135,6 +134,8 @@ stop() {
135134 FTL_EXIT_CODE=1
136135 fi
137136
137+ ftl_cleanup
138+
138139 echo " "
139140 echo " [i] pihole-FTL exited with status $FTL_EXIT_CODE "
140141 echo " "
You can’t perform that action at this time.
0 commit comments