From 577beba2156255aa3813433bd712725f57f4e853 Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 7 Sep 2017 10:03:54 +0200 Subject: Add roaming mode toggle script --- roaming.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 roaming.sh diff --git a/roaming.sh b/roaming.sh new file mode 100755 index 0000000..17b67b3 --- /dev/null +++ b/roaming.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +set -x + +case $1 in + "enable") + systemctl --user stop syncthing + sudo systemctl start tinc + ;; + "disable") + systemctl --user start syncthing + sudo systemctl stop tinc + ;; + *) + echo "Invalid action." + echo "Usage: $0 enable|disable" + exit + ;; +esac + -- cgit v1.2.3