|
From: | Patrick Baldwin |
Subject: | Monit and VPNC |
Date: | Wed, 6 May 2020 13:45:07 -0400 |
Parameter | Value |
---|---|
Name | vpnc |
Pid file | /var/run/vpnc.pid |
Status | Execution failed | Does not exist |
Monitoring status | Monitored |
Monitoring mode | active |
On reboot | start |
Start program | '/home/myers/vpnc-wrapper' timeout 30 s |
Stop program | '/home/myers/vpnc-wrapper' timeout 30 s |
Data collected | Wed, 06 May 2020 13:42:11 |
Existence | If doesn't exist then restart |
I verified the full path to VPNC:
12$ which vpnc
/usr/sbin/vpnc
-rw-rw-rw-. 1 root root 246 May 5 18:54 vpnc-wrapper
41$ cat vpnc-wrapper
#!/bin/bash
case $1 in
start)
echo $$ > /var/run/vpnc.pid;
exec 2>&1 /usr/sbin/vpnc 1>/tmp/vpnc.out
;;
stop)
kill `cat /var/run/vpnc.pid` ;;
*)
echo "usage: vpnc {start|stop}" ;;
esac
exit 0
check process vpnc with pidfile /var/run/vpnc.pid
start = "/home/myers/vpnc-wrapper"
stop = "/home/myers/vpnc-wrapper"
[Prev in Thread] | Current Thread | [Next in Thread] |