plugins: pidfile: Fall back to /run if _PATH_VARRUN doesn't exist
@@ -235,9 +235,12 @@ static void pidfile_init(void *arg)
*/
path = realpath(_PATH_VARRUN, NULL);
if (!path) {
- _pe("Failed ");
+ path = realpath("/run", NULL);
+ if (!path) {
+ _e("System does not have %s or /run, aborting.", _PATH_VARRUN);
return;
}
+ }
if (pidfile_add_path(&iw_pidfile, path))
iwatch_exit(&iw_pidfile);
