summaryrefslogtreecommitdiffstats
path: root/etc/phpshellsessions/enablecarp
diff options
context:
space:
mode:
Diffstat (limited to 'etc/phpshellsessions/enablecarp')
-rw-r--r--etc/phpshellsessions/enablecarp22
1 files changed, 22 insertions, 0 deletions
diff --git a/etc/phpshellsessions/enablecarp b/etc/phpshellsessions/enablecarp
new file mode 100644
index 0000000..b10e15e
--- /dev/null
+++ b/etc/phpshellsessions/enablecarp
@@ -0,0 +1,22 @@
+! echo "Enabling CARP..."
+require_once("config.inc");
+require_once("interfaces.inc");
+require_once("util.inc");
+
+if(is_array($config['virtualip']['vip'])) {
+ $viparr = &$config['virtualip']['vip'];
+ foreach ($viparr as $vip) {
+ switch ($vip['mode']) {
+ case "carp":
+ interface_carp_configure($vip);
+ sleep(1);
+ break;
+ case "ipalias":
+ if (strstr($vip['interface'], "_vip"))
+ interface_ipalias_configure($vip);
+ break;
+ }
+ }
+}
+interfaces_carp_setup();
+mwexec("/sbin/sysctl net.inet.carp.allow=1");
OpenPOWER on IntegriCloud