Adding custom systemd unit

This commit is contained in:
tengel 2024-03-20 08:41:22 -05:00
parent 1fc5118d37
commit 71932ec16b
2 changed files with 21 additions and 5 deletions

View file

@ -2,15 +2,17 @@
pkgname=vpn-unlimited
pkgver=2.4.0
pkgrel=1
pkgrel=2
pkgdesc="VPN client for the VPN Unlimited service"
arch=('x86_64')
url="https://www.vpnunlimitedapp.com/downloadlinux"
license=('custom')
options=('emptydirs')
depends=('qt4' 'libssh2' 'libcurl-compat')
source=("http://apt.simplexsolutionsinc.com/repository/pool/main/v/vpn-unlimited/${pkgname}_${pkgver}_amd64.deb")
md5sums=('0d14a75000af104c88247f5915dfad40')
source=("http://apt.simplexsolutionsinc.com/repository/pool/main/v/vpn-unlimited/${pkgname}_${pkgver}_amd64.deb"
"vpn-unlimited-daemon.service")
md5sums=('0d14a75000af104c88247f5915dfad40'
'7c3269456d352df8d676c722058b5067')
package() {
# Unpack the vendor package
@ -28,7 +30,10 @@ package() {
# Alter the desktop file to launch our script instead
sed -i 's/Exec=vpn-unlimited/Exec=vpnu-arch/g' "${pkgdir}/usr/share/applications/vpn-unlimited.desktop"
# Save this for conversion to a systemd unit some day
cp -p "${srcdir}/etc/init.d/vpn-unlimited-daemon" "${pkgdir}/usr/share/doc/vpn-unlimited/"
# Add our custom systemd unit
install -Dm0644 "${srcdir}/vpn-unlimited-daemon.service" "${pkgdir}/lib/systemd/system/vpn-unlimited-daemon.service"
# Save this original file
cp -p "${srcdir}/etc/init.d/vpn-unlimited-daemon" "${pkgdir}//usr/share/doc/vpn-unlimited/"
}

View file

@ -0,0 +1,11 @@
[Unit]
Description=VPN Unlimited daemon
After=network.target
[Service]
Type=simple
PIDFile=/var/run/vpn-unlimited-daemon.pid
ExecStart=/usr/bin/vpn-unlimited-daemon
[Install]
WantedBy=multi-user.target