diff options
author | Nicolas Stinus | 2017-06-10 23:39:27 +0800 |
---|---|---|
committer | Nicolas Stinus | 2017-06-15 00:27:22 +0800 |
commit | 05ef660c30980cbe5ac6e269957ca61c76dded41 (patch) | |
tree | 3f54bf29e3dbd1feae1440b769d7f2a9c16dc33b | |
parent | cb2f45b0d97a838e64b9f8c96ac5aa4879ad68b1 (diff) | |
download | aur-05ef660c30980cbe5ac6e269957ca61c76dded41.tar.gz |
Pull master and adapt for new nordvpn infos command (requires python-pandas)
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | openvpn-nordvpn.install | 8 |
3 files changed, 18 insertions, 3 deletions
@@ -1,6 +1,6 @@ pkgbase = openvpn-nordvpn pkgdesc = OpenVPN helper script for nordvpn.com - pkgver = 0.1.7 + pkgver = 0.1.9 pkgrel = 1 url = https://github.com/nstinus/nordvpn install = openvpn-nordvpn.install @@ -18,6 +18,7 @@ pkgbase = openvpn-nordvpn depends = bc optdepends = iputils: run ping and rank functions optdepends = vpnfailsafe-git: use instead of update-resolv-conf if available + optdepends = python-pandas: run nordvpn infos command provides = nordvpn source = git+https://github.com/nstinus/nordvpn.git#branch=master sha1sums = SKIP @@ -1,7 +1,7 @@ # Maintainer: Nicolas Stinus <nicolas.stinus@gmail.com> pkgname=openvpn-nordvpn -pkgver=0.1.7 +pkgver=0.1.9 pkgrel=1 pkgdesc="OpenVPN helper script for nordvpn.com" arch=(any) @@ -16,7 +16,8 @@ depends=('openvpn' 'coreutils' 'bc') optdepends=('iputils: run ping and rank functions' - 'vpnfailsafe-git: use instead of update-resolv-conf if available') + 'vpnfailsafe-git: use instead of update-resolv-conf if available' + 'python-pandas: run nordvpn infos command') makedepends=('coreutils' 'pandoc') provides=('nordvpn') source=("git+https://github.com/nstinus/nordvpn.git#branch=${NORDVPN_BRANCH:-master}") @@ -40,4 +41,9 @@ build() { package() { install -D -m 644 nordvpn.8.gz $pkgdir/usr/share/man/man8/nordvpn.8.gz install -D -m 755 nordvpn/nordvpn $pkgdir/usr/bin/nordvpn + if [ -f nordvpn/servers.py ] + then + install -D -m 644 nordvpn/servers.py $pkgdir/etc/openvpn/client/nordvpn/servers.py + chmod 750 $pkgdir/etc/openvpn/client $pkgdir/etc/openvpn/client/nordvpn + fi } diff --git a/openvpn-nordvpn.install b/openvpn-nordvpn.install index d09f477b4603..cf54a7ed3f7c 100644 --- a/openvpn-nordvpn.install +++ b/openvpn-nordvpn.install @@ -2,6 +2,14 @@ pre_remove() { nordvpn stop } +post_upgrade() { + if [ $(find /etc/openvpn/client -name 'nordvpn_*p.conf' | wc -l) -eq 0 ]; + then + echo "Config files outdated." + nordvpn update -f + fi +} + post_remove() { rm -rf /etc/openvpn/client/nordvpn find /etc/openvpn/client -name 'nordvpn_*.conf' | xargs -r rm |