dotfiles/root/etc/NetworkManager/dispatcher.d/11-ssh-tunnel.sh
Marko Korhonen b1335a3628 Removed commit history
Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
2019-10-26 20:05:31 +03:00

9 lines
206 B
Bash
Executable file

#!/bin/bash
if [[ "$2" == "up" ]] || [ "$2" == "vpn-up"]]; then
su - reekymarko -c 'ssh -f -N -R 8123:localhost:22 teapot sleep 10'
fi
if [[ "$2" == "down" ]] || [ "$2" == "vpn-up"]];then
killall ssh
fi