diff options
author | Silvio Fricke | 2015-12-07 11:35:21 +0000 |
---|---|---|
committer | Silvio Fricke | 2015-12-07 12:59:40 +0000 |
commit | ab9259a29c8c1c7d946fbbd3568083763dcab6a6 (patch) | |
tree | b53d02aba02abb2257f2a223c0ec9fe0cd418e60 | |
download | aur-ab9259a29c8c1c7d946fbbd3568083763dcab6a6.tar.gz |
initial commit
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 38 | ||||
-rw-r--r-- | forti.conf | 5 | ||||
-rw-r--r-- | forti.expect | 24 | ||||
-rw-r--r-- | forti.install | 4 | ||||
-rw-r--r-- | forti.service | 6 |
7 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6d74a184ec78 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +# Generated by mksrcinfo v8 +# Mon Dec 7 12:59:31 UTC 2015 +pkgbase = forticlientsslvpn-systemd + pkgdesc = systemd service for fortiClient SSLVPN + pkgver = 1 + pkgrel = 1 + install = forti.install + arch = any + license = GPL + depends = expect + depends = forticlientsslvpn + backup = etc/forti.conf + source = forti.conf + source = forti.expect + source = forti.service + md5sums = e233ab6c985244d9ec7e0f06ee0edb89 + md5sums = b615bce30f3363e7294a3ab178176166 + md5sums = c2039ad66bcf27286ff402dc661371fc + +pkgname = forticlientsslvpn-systemd + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..43d261a5d822 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +pkg +src +*.pkg.tar.xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e03b5390198f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Silvio Fricke <silvio.fricke@gmail.com> +pkgname=forticlientsslvpn-systemd +pkgver=1 +pkgrel=1 +pkgdesc="systemd service for fortiClient SSLVPN" +arch=('any') +license=('GPL') +depends=('expect' 'forticlientsslvpn') +backup=('etc/forti.conf') +install='forti.install' +source=("forti.conf" + "forti.expect" + "forti.service") + +prepare() { + : +} + +build() { + : +} + +check() { + : +} + +package() { + install -d ${pkgdir}/etc \ + ${pkgdir}/usr/lib/forti \ + ${pkgdir}/usr/lib/systemd/system + install -m 0600 ${srcdir}/forti.conf ${pkgdir}/etc/ + install -m 0755 ${srcdir}/forti.expect ${pkgdir}/usr/lib/forti/forti.expect + install -m 0644 ${srcdir}/forti.service ${pkgdir}/usr/lib/systemd/system/forti.service +} + +md5sums=('e233ab6c985244d9ec7e0f06ee0edb89' + 'b615bce30f3363e7294a3ab178176166' + 'c2039ad66bcf27286ff402dc661371fc') diff --git a/forti.conf b/forti.conf new file mode 100644 index 000000000000..5ab9034d6c59 --- /dev/null +++ b/forti.conf @@ -0,0 +1,5 @@ +INSTALLPATH=/opt/fortinet/forticlientsslvpn +VPNIP= +VPNPORT= +VPNUSER= +VPNPASS= diff --git a/forti.expect b/forti.expect new file mode 100644 index 000000000000..14559d2f1df7 --- /dev/null +++ b/forti.expect @@ -0,0 +1,24 @@ +#!/usr/bin/expect -f +set force_conservative 0 ; +if {$force_conservative} { + set send_slow {1 .1} + proc send {ignore arg} { + sleep .1 + exp_send -s -- $arg + } +} +set timeout -1 +spawn /usr/bin/bash +match_max 100000 +send -- "cd $env(INSTALLPATH)\r" +send -- "./forticlientsslvpn_cli --server $env(VPNIP):$env(VPNPORT) --vpnuser $env(VPNUSER)" +expect -exact "./forticlientsslvpn_cli --server $env(VPNIP):$env(VPNPORT) --vpnuser $env(VPNUSER)" +send -- "\r" +expect -exact "\r +Password for VPN:" +send -- "$env(VPNPASS)\r" +expect -exact "\r +STATUS::Setting up the tunnel\r +STATUS::Connecting...\r" +send -- "Y\r" +expect eof diff --git a/forti.install b/forti.install new file mode 100644 index 000000000000..20649a8b566e --- /dev/null +++ b/forti.install @@ -0,0 +1,4 @@ +## arg 1: the new package version +post_install() { + echo "please change the configuration file '/etc/forti.conf'" +} diff --git a/forti.service b/forti.service new file mode 100644 index 000000000000..47a04c374da9 --- /dev/null +++ b/forti.service @@ -0,0 +1,6 @@ +[Unit] +Description=forticlient systemd + +[Service] +ExecStart=/usr/lib/forti/forti.expect +EnvironmentFile=/etc/forti.conf |