Skip to content
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.

code format="bash"

  1. !/bin/sh
  2. 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




  1. Avoid a memory leak problem in Red Hat 8
export LANG=C


echo Running mh exec setuidgid x10 perl ${MHBIN}/mh "$@" rc=$? echo mh rc=$rc

  1. rc==1 means that a user requested that mh shut down
if [$rc]; then
  echo mh exited normally
  touch down
  exit

fi





  1. if the mh.startup file still exists, then misterhouse didn't
  2. start correctly
if [-f]; then
  echo mh failed on startup ... will not restart
  touch down
  exit

fi



date >> $MHBIN/mh_restart.log code

Clone this wiki locally