From 1e2ffc2bb8e40727cfcf85121f50fa8d728591bb Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Tue, 26 Jul 2022 01:28:18 +0000 Subject: feat: Update midr version --- midr/APKBUILD | 20 +++++++++----------- midr/midr.confd | 9 ++------- midr/midr.initd | 11 ++++++++--- midr/midr.post-install | 4 ---- midr/midr.pre-install | 7 ++++++- 5 files changed, 25 insertions(+), 26 deletions(-) delete mode 100644 midr/midr.post-install diff --git a/midr/APKBUILD b/midr/APKBUILD index a9b1b94..0377d11 100644 --- a/midr/APKBUILD +++ b/midr/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Gabriel Arakaki Giovanini pkgname=midr -pkgver=0.1.0 +pkgver=0.1.1 pkgrel=0 pkgdesc="yt-dlp simple frontend" url="https://git.sr.ht/~gabrielgio/midr" @@ -10,7 +10,7 @@ makedepends=" go " builddir="$srcdir/$pkgname-v$pkgver/" -install="$pkgname.pre-install $pkgname.post-install" +install="$pkgname.pre-install" subpackages="$pkgname-openrc" source=" ${pkgname}-${pkgver}.tar.gz::https://artifacts.gabrielgio.me/${pkgname}/${pkgname}-v${pkgver}.tar.gz @@ -27,14 +27,12 @@ build() { . } -check() { - # Replace with proper check command(s) - : -} - package() { - install -Dm755 "$pkgname" "$pkgdir"/usr/bin/"$pkgname" + install -Dm755 "$pkgname" "$pkgdir"/usr/lib/"$pkgname"/"$pkgname" + + mkdir -p "$pkgdir"/usr/bin + ln -s /usr/lib/"$pkgname"/"$pkgname" "$pkgdir"/usr/bin/"$pkgname" install -m755 -D "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname @@ -43,7 +41,7 @@ package() { } sha512sums=" -4b170b6466bdc4da60cf6582ab43ffb55ea09ccef58490453377d07fe38996c0d1a4408c5c68d2f3ab75f607afce443fb86ae5d6c04f7a9be844bf870064c075 midr-0.1.0.tar.gz -512331fd6b4c5621c14b8bf07a94b2318dc33fea245de1e66d6385e1dc4cbfde7cb0d53507b46c85a11defe65a936cca40ace80df76130c7af2ef5999899892c midr.initd -f11f0d192cd7823307c2ce4ddc7b3fff5190f72d3f65a5524b487021a95a222aca1fd36ab1eb58ed533e7acd555bfb70f0c8a13db20338ea31527f3151fd2bd7 midr.confd +a114bfe718d95ad5157aa55870b6bceb61dfcea7e0cb5d76b2ecd3b29a266d1c1e8c1204a4020da798a8bd24210b3eccdf1779311b524897458be511652692ba midr-0.1.1.tar.gz +28927837fb4183509054830bf93342c09123b8589ad1d66272c9e3decef3f83e1cb2d1f30a0a8147edf5628b8834447f87aa7001f76a71e826f16836f72a3436 midr.initd +6329a88c5d88fdc1f8c2b3f009d988dc03d6a3c2bb7e2e9eebaf0002625d74a13c824fd90ff67dcb9cba2fb15008b92e68d57d6f3a5a2c5331d13d5f5b11ff72 midr.confd " diff --git a/midr/midr.confd b/midr/midr.confd index 486252b..50d6ea3 100644 --- a/midr/midr.confd +++ b/midr/midr.confd @@ -1,7 +1,2 @@ -# Sample conf.d file for alpine linux - -# -# Specify daemon options here. -# - -sample_opts="" +datadir="/var/lib/jellyfin" +opts="-p" diff --git a/midr/midr.initd b/midr/midr.initd index 0dc706c..7640168 100644 --- a/midr/midr.initd +++ b/midr/midr.initd @@ -2,9 +2,10 @@ # Sample init.d file for alpine linux. -name= -command="/usr/sbin/$name" -command_args="$sample_opts" +name="midr" +command="/usr/bin/$name" +command_user=www-data:www-data +command_args="-d ${datadir} ${opts}" command_background="yes" start_stop_daemon_args="--user $sample_user:$sample_group" @@ -14,3 +15,7 @@ depend() { need net after firewall } + +start_pre() { + checkpath -d -o $command_user "$datadir" +} diff --git a/midr/midr.post-install b/midr/midr.post-install deleted file mode 100644 index 512fd3e..0000000 --- a/midr/midr.post-install +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# add something which happens after install - diff --git a/midr/midr.pre-install b/midr/midr.pre-install index 20f04f7..74f1b59 100644 --- a/midr/midr.pre-install +++ b/midr/midr.pre-install @@ -1,4 +1,9 @@ #!/bin/sh -# add something which happens before install +user=www-data +group=www-data +addgroup -S $group 2>/dev/null +adduser -S -D -h /var/lib/$user -s /sbin/nologin -G $group -g $user $user 2>/dev/null + +exit 0 -- cgit v1.2.3