#!/bin/sh up () { transmission-remote --exit sudo wg-quick up myvpn exit } down () { sudo wg-quick down myvpn start-program transmission-daemon exit } [ "$1" = "up" ] && up [ "$1" = "down" ] && down exit 1