Last active
October 16, 2023 20:05
-
-
Save fumiyas/cac645b0ae5e1d1ab315 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
## Create a CISCO AnyConnect VPN Client *.deb from anyconnect-predeploy-linux-*.tar | |
## Copyright (c) SATOH Fumiyasu @ OSS Technology Corp., Japan | |
## | |
## License: GNU General Public License version 3 | |
## | |
set -u | |
set -e | |
umask 0022 | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 anyconnect-predeploy-linux[-64]-<VERSION>.tar" | |
exit 1 | |
fi | |
anyconnect_tar="$1"; shift | |
anyconnect_ver="${anyconnect_tar#anyconnect-predeploy-linux-}" | |
anyconnect_ver="${anyconnect_ver#64-}" | |
anyconnect_ver="${anyconnect_ver%-*}" | |
mkdir -p /opt/cisco/anyconnect | |
mkdir -p /opt/cisco/vpn/bin | |
mkdir -p /opt/.cisco/certificates | |
mkdir -p /etc/xdg/menus | |
echo : >/etc/init.d/vpnagentd | |
chmod +x /etc/init.d/vpnagentd | |
tar xf "$anyconnect_tar" | |
( | |
cd "anyconnect-$anyconnect_ver/vpn" | |
echo y \ | |
|checkinstall \ | |
--default \ | |
--nodoc \ | |
--install=no \ | |
--pkgname cisco-anyconnect \ | |
--pkgversion "$anyconnect_ver" \ | |
--pkglicense Proprietary \ | |
./vpn_install.sh \ | |
; | |
mv *.deb ../.. | |
) | |
rm -rf "anyconnect-$anyconnect_ver" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment