Skip to content

Instantly share code, notes, and snippets.

@haarts
Created August 31, 2012 20:13
Show Gist options
  • Save haarts/3558314 to your computer and use it in GitHub Desktop.
Save haarts/3558314 to your computer and use it in GitHub Desktop.
RaspberryPi Tor monit configuration (bonus: vnstat monit configuration)
# Tor is leaking memory. Restart when necessary.
check process tor with pidfile /var/run/tor/tor.pid
start program = "/usr/sbin/tor -f /etc/tor/torrc"
stop program = "/bin/sh -c '/bin/kill -s SIGTERM `cat /var/run/tor/tor.pid` && rm /var/run/tor/tor.pid'"
if mem > 64 MB for 3 cycles then restart
# Vnstat can't start on boot as the RaspberryPi doesn't have a clock which messes up update stamps and what not.
check process vnstat with pidfile /var/run/vnstat.pid
start program = "/usr/sbin/service vnstat start"
stop program = "/usr/sbin/service vnstat stop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment