|
|
fire-eyes wrote: > What does the variable $5 in the whatever.up scripts represent? Are > there other useful variables? $1 reflects the first command-line parameter passed in to the script, $2 the second, and so forth. These are unique to the individual script, and are documented in the man page. For instance, from the learn-address section: > cmd will be executed with 3 parameters: > > [1] operation -- "add", "update", or "delete" based on whether or not the address is being added to, modified, or deleted from OpenVPN's internal routing table. > [2] address -- The address being learned or unlearned. This can be an IPv4 address such as "198.162.10.14", an IPv4 subnet such as "198.162.10.0/24", or an ethernet MAC address (when --dev tap is being used) such as "00:FF:01:02:03:04". > [3] common name -- The common name on the certificate associated with the client linked to this address. Only present for "add" or "update" operations, not "delete". So, there you are -- for learn-address, $1 is "add", "update" or "delete"; $2 is the address; and $3 is the common name. As for other variables, look at the "Scripting and Environmental Variables" section of the man page. ______________________ OpenVPN mailing lists https://lists.sourceforge.net/lists/listinfo/openvpn-users |