mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-24 02:22:15 +08:00
add systemd units to openvpn
This commit is contained in:
parent
dba5a787b4
commit
1850922117
@ -1,6 +1,6 @@
|
||||
pkgname=openvpn
|
||||
pkgver=2.1.4
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="An easy-to-use, robust, and highly configurable VPN (Virtual Private Network)"
|
||||
arch=(i686 x86_64)
|
||||
url="http://openvpn.net/index.php/open-source.html"
|
||||
@ -12,11 +12,13 @@ backup=(usr/share/openvpn/easy-rsa/vars
|
||||
source=(http://swupdate.openvpn.net/community/releases/openvpn-${pkgver}.tar.gz
|
||||
openvpn.rc
|
||||
openvpn-tapdev.rc
|
||||
openvpn-tapdev.conf)
|
||||
openvpn-tapdev.conf
|
||||
openvpn@.service)
|
||||
md5sums=('96a11868082685802489254f03ff3bde'
|
||||
'a3809b9727f0c2af2d0770f5c7442db2'
|
||||
'd2c48e970088d679dd3c2afd914ff731'
|
||||
'722f483c9e3ce2ec66d3301aaf7cf3d5')
|
||||
'722f483c9e3ce2ec66d3301aaf7cf3d5'
|
||||
'44047df812a3fcd57a7e36a61732a9b9')
|
||||
|
||||
build() {
|
||||
cd $srcdir/$pkgname-$pkgver
|
||||
@ -55,4 +57,7 @@ package() {
|
||||
install -D -m755 $srcdir/openvpn.rc $pkgdir/etc/rc.d/openvpn
|
||||
install -D -m755 $srcdir/openvpn-tapdev.rc $pkgdir/etc/rc.d/openvpn-tapdev
|
||||
install -D -m644 $srcdir/openvpn-tapdev.conf $pkgdir/etc/conf.d/openvpn-tapdev
|
||||
|
||||
# install systemd units
|
||||
install -Dm644 "$srcdir/openvpn@.service" "$pkgdir/usr/lib/systemd/system/openvpn@.service"
|
||||
}
|
||||
|
10
openvpn/openvpn@.service
Normal file
10
openvpn/openvpn@.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=OpenVPN connection to %i
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i --cd /etc/openvpn
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user