diff options
author | Funami | 2021-12-02 21:19:51 +0100 |
---|---|---|
committer | Funami | 2021-12-02 21:19:51 +0100 |
commit | 55ec04a64fbcf5e79e34e16c81c76f2e9eade1b4 (patch) | |
tree | f5b670df2330af4774e68bb66019c2c37b99505f | |
download | aur-55ec04a64fbcf5e79e34e16c81c76f2e9eade1b4.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 42 | ||||
-rw-r--r-- | mullvad-vpn-log.consumer-for | 1 | ||||
-rw-r--r-- | mullvad-vpn-log.notification-fd | 1 | ||||
-rw-r--r-- | mullvad-vpn-log.pipeline-name | 1 | ||||
-rw-r--r-- | mullvad-vpn-log.run | 9 | ||||
-rw-r--r-- | mullvad-vpn-log.type | 1 | ||||
-rw-r--r-- | mullvad-vpn-srv.producer-for | 1 | ||||
-rw-r--r-- | mullvad-vpn-srv.run | 3 | ||||
-rw-r--r-- | mullvad-vpn-srv.type | 1 | ||||
-rw-r--r-- | mullvad-vpn.conf | 2 |
11 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8a67c5658e71 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = mullvad-vpn-s6 + pkgdesc = s6-rc service scripts for mullvad-vpn + pkgver = 20211202 + pkgrel = 1 + arch = any + depends = mullvad-vpn + depends = s6-base + provides = init-mullvad-vpn + conflicts = init-mullvad-vpn + backup = etc/s6/config/mullvad-vpn.conf + source = mullvad-vpn.conf + source = mullvad-vpn-log.consumer-for + source = mullvad-vpn-log.notification-fd + source = mullvad-vpn-log.pipeline-name + source = mullvad-vpn-log.run + source = mullvad-vpn-log.type + source = mullvad-vpn-srv.producer-for + source = mullvad-vpn-srv.run + source = mullvad-vpn-srv.type + sha256sums = 8a3d2abcc40d355ca913f39871d24f6c770dd216fe075d2548e729b2ae952135 + sha256sums = b981765e30c23ca65b5cce7bd865e51bb75a761ff694c41925d0d7408d076af0 + sha256sums = 1121cfccd5913f0a63fec40a6ffd44ea64f9dc135c66634ba001d10bcf4302a2 + sha256sums = 2c073fafdd82eb0d5f95021949df0d3f244972d02000a22c2b675f1633d315b9 + sha256sums = 1bb88c6ea06c1d1fb63f36dcbf5f1ccbb93d1d9c0757cf8d6a9a3fca84df388d + sha256sums = d0001a150b83f68f09004c5059045cb76a3f064eed4d42ce072bc3722c118006 + sha256sums = df44fddd79add956bf7094c8b14353e4f4db83e8511327623a3889543ef58bc8 + sha256sums = 5341209cdd24f4210f67a43b5566c70732e46c9e545834060f3d6e14d3305b02 + sha256sums = d0001a150b83f68f09004c5059045cb76a3f064eed4d42ce072bc3722c118006 + +pkgname = mullvad-vpn-s6 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f527d9dd3c8b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Funami +pkgname=mullvad-vpn-s6 +pkgver=20211202 +pkgrel=1 +pkgdesc="s6-rc service scripts for mullvad-vpn" +arch=('any') +depends=('mullvad-vpn' 's6-base') +provides=('init-mullvad-vpn') +conflicts=('init-mullvad-vpn') +backup=('etc/s6/config/mullvad-vpn.conf') +source=('mullvad-vpn.conf' + 'mullvad-vpn-log.consumer-for' + 'mullvad-vpn-log.notification-fd' + 'mullvad-vpn-log.pipeline-name' + 'mullvad-vpn-log.run' + 'mullvad-vpn-log.type' + 'mullvad-vpn-srv.producer-for' + 'mullvad-vpn-srv.run' + 'mullvad-vpn-srv.type') +sha256sums=('8a3d2abcc40d355ca913f39871d24f6c770dd216fe075d2548e729b2ae952135' + 'b981765e30c23ca65b5cce7bd865e51bb75a761ff694c41925d0d7408d076af0' + '1121cfccd5913f0a63fec40a6ffd44ea64f9dc135c66634ba001d10bcf4302a2' + '2c073fafdd82eb0d5f95021949df0d3f244972d02000a22c2b675f1633d315b9' + '1bb88c6ea06c1d1fb63f36dcbf5f1ccbb93d1d9c0757cf8d6a9a3fca84df388d' + 'd0001a150b83f68f09004c5059045cb76a3f064eed4d42ce072bc3722c118006' + 'df44fddd79add956bf7094c8b14353e4f4db83e8511327623a3889543ef58bc8' + '5341209cdd24f4210f67a43b5566c70732e46c9e545834060f3d6e14d3305b02' + 'd0001a150b83f68f09004c5059045cb76a3f064eed4d42ce072bc3722c118006') + +_inst_sv() { + for file in consumer-for notification-fd pipeline-name producer-for run type; do + if test -f "$1.$file"; then + install -Dm644 "$1.$file" "$pkgdir/etc/s6/sv/$1/$file" + fi + done +} + +package() { + _inst_sv 'mullvad-vpn-log' + _inst_sv 'mullvad-vpn-srv' + install -Dm644 "mullvad-vpn.conf" -t "$pkgdir/etc/s6/config" +} diff --git a/mullvad-vpn-log.consumer-for b/mullvad-vpn-log.consumer-for new file mode 100644 index 000000000000..91216f327840 --- /dev/null +++ b/mullvad-vpn-log.consumer-for @@ -0,0 +1 @@ +mullvad-vpn-srv diff --git a/mullvad-vpn-log.notification-fd b/mullvad-vpn-log.notification-fd new file mode 100644 index 000000000000..00750edc07d6 --- /dev/null +++ b/mullvad-vpn-log.notification-fd @@ -0,0 +1 @@ +3 diff --git a/mullvad-vpn-log.pipeline-name b/mullvad-vpn-log.pipeline-name new file mode 100644 index 000000000000..8b750882ad6f --- /dev/null +++ b/mullvad-vpn-log.pipeline-name @@ -0,0 +1 @@ +mullvad-daemon diff --git a/mullvad-vpn-log.run b/mullvad-vpn-log.run new file mode 100644 index 000000000000..6a59157aea5d --- /dev/null +++ b/mullvad-vpn-log.run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/mullvad-vpn.conf +importas -sCuD "n3 s2000000 T" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o s6log -g s6log /var/log/mullvad-vpn } + s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/mullvad-vpn +} +foreground { install -d -o s6log -g s6log /run/log/mullvad-vpn } +s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/mullvad-vpn diff --git a/mullvad-vpn-log.type b/mullvad-vpn-log.type new file mode 100644 index 000000000000..5883cff0cd15 --- /dev/null +++ b/mullvad-vpn-log.type @@ -0,0 +1 @@ +longrun diff --git a/mullvad-vpn-srv.producer-for b/mullvad-vpn-srv.producer-for new file mode 100644 index 000000000000..8156f73db5c5 --- /dev/null +++ b/mullvad-vpn-srv.producer-for @@ -0,0 +1 @@ +mullvad-vpn-log diff --git a/mullvad-vpn-srv.run b/mullvad-vpn-srv.run new file mode 100644 index 000000000000..4ae0fa70e04d --- /dev/null +++ b/mullvad-vpn-srv.run @@ -0,0 +1,3 @@ +#!/bin/execlineb -P +fdmove -c 2 1 +exec "/opt/Mullvad VPN/resources/mullvad-daemon" -v --disable-log-to-file --disable-stdout-timestamps diff --git a/mullvad-vpn-srv.type b/mullvad-vpn-srv.type new file mode 100644 index 000000000000..5883cff0cd15 --- /dev/null +++ b/mullvad-vpn-srv.type @@ -0,0 +1 @@ +longrun diff --git a/mullvad-vpn.conf b/mullvad-vpn.conf new file mode 100644 index 000000000000..565bdae8e3ff --- /dev/null +++ b/mullvad-vpn.conf @@ -0,0 +1,2 @@ +# This configures the directives used for s6-log in the log service. +DIRECTIVES="n3 s2000000 T" |