# -*- shell-script -*-

if [ "$1" = 'purge' ] ; then
    # If runscript was never invoked, these files would not exist,
    # so we use -f option of rm(1).
   for file in control lock ok pid stat status ; do
       rm -f "/var/lib/runit/supervise/#NAME#/$file"
   done
   # It should exist and be empty now. If it is not, either user touched it,
   # or there is a BUG in dh-runit!
   rmdir "/var/lib/runit/supervise/#NAME#"
fi

# Local Variables:
# eval: (sh-set-shell "sh" t nil)
# End:
