From 45b2aa221aa2a5a85c9e221b5e03256bd0823999 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 29 Dec 2020 01:27:26 +0100 Subject: ws/minet: add more connection scripts --- .../templates/connections/elevateForumWire.j2 | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 roles/ws/minet/templates/connections/elevateForumWire.j2 (limited to 'roles/ws/minet/templates/connections/elevateForumWire.j2') diff --git a/roles/ws/minet/templates/connections/elevateForumWire.j2 b/roles/ws/minet/templates/connections/elevateForumWire.j2 new file mode 100755 index 00000000..a770bfd8 --- /dev/null +++ b/roles/ws/minet/templates/connections/elevateForumWire.j2 @@ -0,0 +1,32 @@ +#!/bin/sh + +SHORT_NAME="elevateforumwire" +DESC_NAME="elevate Forum WIRE" +INTERFACE="{{ ws_minet_wired_interface_name }}" +MODULE_NAME="{{ ws_minet_wired_interface_module }}" + +. /usr/local/lib/minet/minet_helpers.sh + +case "$1" in + start|"") + echo "Connecting with $DESC_NAME" + activate_interface $INTERFACE $MODULE_NAME + ifconfig $INTERFACE 192.168.84.78 netmask 255.255.255.0 + ip addr add dev $INTERFACE 109.73.158.78 + ip route add default via 192.168.84.254 src 109.73.158.78 + echo "search spreadspace.org" > /tmp/$SHORT_NAME.resolv + echo "domain spreadspace.org" >> /tmp/$SHORT_NAME.resolv + echo "nameserver 217.29.144.65" >> /tmp/$SHORT_NAME.resolv + echo "nameserver 217.29.144.66" >> /tmp/$SHORT_NAME.resolv + resolvconf -a $INTERFACE < /tmp/$SHORT_NAME.resolv + rm /tmp/$SHORT_NAME.resolv + ;; + stop) + echo "Disconnecting from $DESC_NAME" + resolvconf -d $INTERFACE + deactivate_interface $INTERFACE $MODULE_NAME + ;; + *) + exit 1 + ;; +esac -- cgit v1.2.3