Skip to content

Instantly share code, notes, and snippets.

@wadey wadey/duo_vpn-deb.sh forked from nbrownus/duo_vpn-deb.sh
Last active Jan 7, 2020

Embed
What would you like to do?
#!/bin/sh
VERSION="2.3.0"
SHA="5e2d679"
BUILD="$SHA-slack2"
set -e -x
DIRNAME="$(cd "$(dirname "$0")" && pwd)"
OLDESTPWD="$PWD"
cd "$(mktemp -d)"
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM
curl -LO "https://github.com/duosecurity/duo_openvpn/tarball/$SHA"
/bin/tar -xvf "$SHA"
cd "duosecurity-duo_openvpn-$SHA"
patch -p1 <<EOF
--- a/duo_openvpn.py 2019-12-18 18:19:21.000000000 +0000
+++ b/duo_openvpn.py 2020-01-07 17:25:27.037800041 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# duo_openvpn.py
# Duo OpenVPN
EOF
make
make install DESTDIR="$PWD/rootfs"
fakeroot fpm -C "$PWD/rootfs" \
-m "Wade Simmons <wadey@slack-corp.com>" \
-n "duo-vpn" -v "$VERSION-$BUILD" \
-p "$OLDESTPWD/duo-vpn_${VERSION}-${BUILD}_amd64.deb" \
-s "dir" -t "deb" \
"opt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.