| 16 |
rodolico |
1 |
# check if flag file update_ddnoc has been placed in /tmp
|
|
|
2 |
# if so, remove it and run perl script to update the router
|
|
|
3 |
# Another process can create a flag file, /tmp/update_routername, where
|
|
|
4 |
# routername is the name of the router recognized by
|
|
|
5 |
# opnsense-totp-ovpn-export
|
|
|
6 |
# if that file exists, we remove it, then run the exporter with
|
|
|
7 |
# the routername as a parameter.
|
|
|
8 |
# opnsense-totp-ovpn-export explicitly uses a lockfile to ensure only one
|
|
|
9 |
# copy is running at a time, so if more than one call is made, it is
|
|
|
10 |
# theoretically safe.
|
|
|
11 |
|
|
|
12 |
# set this to the fully qualified path to the export script
|
|
|
13 |
SCRIPTLOCATION=/var/www/html/web_pages/totp_opnsense/opnsense-totp-ovpn-export
|
|
|
14 |
|
|
|
15 |
# every minute, check if update_routername has been created
|
|
|
16 |
* * * * * root if [ -f /tmp/update_routername ]; then rm /tmp/update_routername; $SCRIPTLOCATION routername; fi
|