summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2018-09-11 19:04:57 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2018-09-11 19:04:57 +0300
commit7b824c5f87530da1984d433ff4d78506d845192a (patch)
tree41d201c07dc573522c4c0d520f6fac37782cab99 /system
parentd8ef6e00956b76e28b16f7bb30d5747d2968d0d8 (diff)
delete pidfile only when it exists
Diffstat (limited to 'system')
-rw-r--r--system/netdata-freebsd.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/netdata-freebsd.in b/system/netdata-freebsd.in
index 501a8c697c..ff716dc977 100644
--- a/system/netdata-freebsd.in
+++ b/system/netdata-freebsd.in
@@ -30,7 +30,7 @@ netdata_prestart()
netdata_poststop()
{
- rm "${pidfile}"
+ [ -f "${pidfile}" ] && rm "${pidfile}"
return 0
}