-
Notifications
You must be signed in to change notification settings - Fork 130
DaemonTools
Lieven Hollevoet edited this page Sep 22, 2014
·
1 revision
Mr House can be run successfully using DJB's daemontools (http://cr.yp.to/daemontools.html). The following is an example /service/mh/run script that also implements WatchDog functionality. The "reload misterhouse" functionality works and it runs mh as a non root user.
- !/bin/sh
- this is /service/mh/run
WATCHDOG=/usr/local/mh/data/watchdog touch ${WATCHDOG} exec 2>&1
MHBIN=/usr/local/mh/mh/bin export mh_parms=/usr/local/mh/mh.private.ini
echo echo Creating startup file touch ${MHBIN}/mh.startup
- Avoid a memory leak problem in Red Hat 8
echo Running mh
exec setuidgid x10 perl
- rc==1 means that a user requested that mh shut down
echo mh exited normally touch down exit
fi
- if the mh.startup file still exists, then misterhouse didn't
- start correctly
echo mh failed on startup ... will not restart touch down exit
fi
date >> $MHBIN/mh_restart.log code