wk on my macOS. I'd like to just run monit in a separate terminal and do some monitoring/workflow improvements. Frankly, most of the monitrc is transferable between macOS <> Linux without changes. On Linux I installed
apt-get and it runs as root, so "as uid" keyword isn't a problem.
One of the cases where stuff gets problematic -- when running on macOS as UID
wk and with
check process hh matching "hh" start program = "/Users/wk/r/hh/_scripts/ctl.sh start" as uid "wk" with timeout 7 seconds stop program = "/Users/wk/r/hh/_scripts/ctl.sh stop" as uid "wk" with timeout 7 seconds if 3 restarts within 5 cycles then unmonitor
$ monit -I /Users/wk/r/hh/monitrc:18: UID statement requires root privileges '"wk"' /Users/wk/r/hh/monitrc:19: UID statement requires root privileges '"wk"'
If the "as UID" and the current UID are the same, there are no special requirements to be met to make that happen. I think it should be permitted without requiring root and failing