Browse Source

delete pidfile only when it exists

Costa Tsaousis (ktsaou) 6 years ago
parent
commit
7b824c5f87
1 changed files with 1 additions and 1 deletions
  1. 1 1
      system/netdata-freebsd.in

+ 1 - 1
system/netdata-freebsd.in

@@ -30,7 +30,7 @@ netdata_prestart()
 
 netdata_poststop()
 {
-	rm "${pidfile}"
+	[ -f "${pidfile}" ] && rm "${pidfile}"
 	return 0
 }