Page 1 of 1

Express VPN wrapper script

Posted: Sat 21 Sep 2019, 23:02
by sc0ttman
Express VPN wrapper script

* fixes the .deb package provided by Express VPN

Code: Select all

#!/bin/ash
#
# a wrapper for expressvpn for Puppy Linux
#
# What is does:
# - makes tunnel device, /dev/net/tun, if needed
# - give start|stop|retart as $1
# - give location to connect to as $2
# - if $2 not given, defaults to "smart" location


mkdir -p /dev/net &>/dev/null
mknod /dev/net/tun c 10 200 &>/dev/null
chmod 666 /dev/net/tun

case "$1" in
  stop|disconnect)
    expressvpn disconnect
    ;;
  start|connect)
    (nohup expressvpnd &) 1>/dev/null
    expressvpn connect "${2:-smart}"
    ;;
  restart|reconnect)
    echo "Restarting daemon"
    expressvpn disconnect  && sleep 0.5
    killall -9 expressvpnd && sleep 1
    (nohup expressvpnd &) 1>/dev/null
    sleep 0.5
    expressvpn connect "${2:-smart}"
    ;;
  *)
    echo "Usage:

$(basename $0) start|stop|restart
"
esac

exit 0


Posted: Tue 01 Oct 2019, 16:24
by ETP
Hi sc0ttman,

Your post reminded me that I long ago made a pet for use with tun.
It may be of use to you and can be found here:
http://murga-linux.com/puppy/viewtopic. ... 709#978652

Just tested that it still works in bionicpup64 8.0 having first installed Conky via Puppy Quickpet.
  • conky-1.10.8-x86_64|Image viewer
    Conky_ppp0_tun_show-V1|Simple desktop display of IP address tun/ppp0/eth0/wlan0