aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2020-05-06 22:14:05 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2020-05-22 13:39:09 +0300
commit4930ad64446cfd4da0b1a0c582ab9cb68e9d836d (patch)
tree85330f21a0f8bb65da81cc7ee8b06eb04cd2a869
parent723572b4b0f36a4ce69d4c799b052de67ba5ed26 (diff)
downloaddmvpn-tools-4930ad64446cfd4da0b1a0c582ab9cb68e9d836d.tar.gz
dmvpn-tools-4930ad64446cfd4da0b1a0c582ab9cb68e9d836d.tar.bz2
dmvpn-tools-4930ad64446cfd4da0b1a0c582ab9cb68e9d836d.tar.xz
dmvpn-ca: reactivation
-rwxr-xr-xdmvpn-ca35
1 files changed, 35 insertions, 0 deletions
diff --git a/dmvpn-ca b/dmvpn-ca
index d20599b..b044289 100755
--- a/dmvpn-ca
+++ b/dmvpn-ca
@@ -879,6 +879,15 @@ commands = {
update('site', {active='0'}, {code=site})
return output
end
+ },
+ reactivate={
+ '<abbr>',
+ function()
+ local site = scan_site(false)
+ scan_finished()
+
+ update('site', {active='1'}, {code=site})
+ end
}
},
subnet={
@@ -992,6 +1001,23 @@ commands = {
return deactivate_vpnc(site, id)
end
+ },
+ reactivate={
+ '<id> site <abbr>',
+ function()
+ local id = toid(scan_next('VPNc number'))
+ local site = scan_site_selector{active=true}
+ scan_finished()
+
+ local filter = {site=site, id=id}
+ check_exists(
+ 'vpnc',
+ filter,
+ 'Invalid VPNc number: '..id,
+ false
+ )
+ update('vpnc', {active='1'}, filter)
+ end
}
},
['gre-addr']={
@@ -1085,6 +1111,15 @@ commands = {
return deactivate_vpnc('', id)
end
+ },
+ reactivate={
+ '<id>',
+ function()
+ local id = scan_hub(false)
+ scan_finished()
+
+ update('vpnc', {active='1'}, {site='', id=id})
+ end
}
},
['root-cert']={