ctucx.git: alpine-pkgs

My personal alpine-packages [deprecated in favor of nixos]

commit c60c769429425cbc1c0d622e88136ee9eac506a4
parent 48b1ca24d42bd350b6546560a1b7a3d94e70cbc6
Author: Leah (ctucx) <leah@ctu.cx>
Date: Wed, 20 Jan 2021 20:43:37 +0100

frp: cleanup & added missing files
4 files changed, 33 insertions(+), 13 deletions(-)
M
frp/APKBUILD
|
24
++++++++++++------------
M
frp/frp.pre-install
|
4
+++-
A
frp/frpc.confd
|
3
+++
A
frp/frpc.initd
|
15
+++++++++++++++
diff --git a/frp/APKBUILD b/frp/APKBUILD
@@ -1,23 +1,23 @@
-# Contributor:
-# Maintainer:
+# Contributor: Leah (ctucx) <leah@ctu.cx>
+# Maintainer: Leah (ctucx) <leah@ctu.cx>
 pkgname=frp
 pkgver=0.34.2
-pkgrel=5
+pkgrel=6
 pkgdesc="Daemon which renders SVG plots from Prometheus data"
 url="https://github.com/fatedier/frp"
 arch="all"
 license="Apache License 2.0"
 depends=""
 makedepends="go"
-install="$pkgname.pre-install"
-subpackages=""
-source="$pkgname.tar.gz::https://github.com/fatedier/frp/archive/v${pkgver}.tar.gz
-        frps.initd
-        frps.confd
-	frpc.initd
-	frpc.confd"
+install="${pkgname}.pre-install"
+subpackages="${pkgname}-openrc"
+source="${pkgname}-${pkgver}.tar.gz::https://github.com/fatedier/frp/archive/v${pkgver}.tar.gz
+        ${pkgname}s.initd
+        ${pkgname}s.confd
+	${pkgname}c.initd
+	${pkgname}c.confd"
 
-builddir="$srcdir/${pkgname}-${pkgver}/"
+builddir="${srcdir}/${pkgname}-${pkgver}/"
 
 build() {
 	cd $builddir

@@ -37,7 +37,7 @@ package() {
 	install -Dm644 "${srcdir}/frpc.confd" "${pkgdir}/etc/conf.d/frpc"
 }
 
-sha512sums="a2b663849bb44e804a08e84847ed690efda8d33794c73c0bc181409655fd94fe2b7089a24d606a2d819f749e0880b9d5df6727b7923fd25781981bbfcf5857f2  frp.tar.gz
+sha512sums="a2b663849bb44e804a08e84847ed690efda8d33794c73c0bc181409655fd94fe2b7089a24d606a2d819f749e0880b9d5df6727b7923fd25781981bbfcf5857f2  frp-0.34.2.tar.gz
 9e5e90d2e8ddc6d2eb4dea4d1803750aac403f5bb71d79c7d733307f4e9ad66e8ce88d938d6cbf32954cddd5671b32685b5be4259dace89c5a8befea5a5faabe  frps.initd
 ead4abcedc42214c83f2e07a920ac2e09b4a39cf4b5e6ccf2cacb89d542801afe1043b109eced4fb2a3c8df6eec44595cfe89f387543c0c7d3cb50a829447b99  frps.confd
 83be9ad71404ab04434bff90cf079aeb301e0fa24e38007e9262dde41dde63a949899b81ea445c5a907b31ca3ee6cc5c7154fbe4b83c8d2aebc1512c83939558  frpc.initd
diff --git a/frp/frp.pre-install b/frp/frp.pre-install
@@ -1,6 +1,8 @@
 #!/bin/sh
 
-addgroup -S frps 2>/dev/null
+addgroup frps
+addgroup frpc
 adduser -S -D -h /var/lib/frps -s /sbin/nologin -G frps -g frps frps 2>/dev/null
+adduser -S -D -h /var/lib/frpc -s /sbin/nologin -G frpc -g frpc frpc 2>/dev/null
 
 exit 0
diff --git a/frp/frpc.confd b/frp/frpc.confd
@@ -0,0 +1,3 @@
+# Configuration for /etc/init.d/frps
+
+frpc_opts=""
diff --git a/frp/frpc.initd b/frp/frpc.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+supervisor=supervise-daemon
+
+name="frpc"
+description="A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."
+
+command="/usr/bin/frpc"
+command_args="$frpc_opts"
+command_user=frpc:frpc
+directory="/var/lib/$RC_SVCNAME"
+
+depend() {
+	need net localmount
+	after firewall
+}