summaryrefslogtreecommitdiff
path: root/mandos
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2024-10-13 16:37:40 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2024-10-13 16:37:46 +0200
commit870d404836a0007ba108f6966efc5aeadee667ec (patch)
tree8ba2e1542084cd6109191207cb61575aab166fb0 /mandos
parent0cd3899055a710b639bbea99489c6964c7a7f668 (diff)
downloadarchlinuxewe-870d404836a0007ba108f6966efc5aeadee667ec.tar.xz
mandos: write usable open-rc init script
Diffstat (limited to 'mandos')
-rw-r--r--mandos/PKGBUILD9
-rwxr-xr-xmandos/mandos.init29
2 files changed, 35 insertions, 3 deletions
diff --git a/mandos/PKGBUILD b/mandos/PKGBUILD
index 927c770b2..c21f921dd 100644
--- a/mandos/PKGBUILD
+++ b/mandos/PKGBUILD
@@ -4,17 +4,19 @@ pkgbase='mandos'
pkgname=('mandos-server' 'mandos-client-nokey')
pkgdesc='system for allowing servers with encrypted root file systems to reboot unattended and/or remotely'
pkgver='1.8.17'
-pkgrel=2
+pkgrel=3
url='https://www.recompile.se/mandos'
license=('GPL')
source=("https://ftp.recompile.se/pub/${pkgbase}/${pkgbase}_${pkgver}.orig.tar.gz"
"https://ftp.recompile.se/pub/${pkgbase}/${pkgbase}_${pkgver}.orig.tar.gz.asc"
- Makefile.patch)
+ Makefile.patch
+ mandos.init)
sha512sums=('0059593ab6b92b5178bbbf0be5d6852ec93393ed39032b05bc54c20c698a9e000c1db6c5069fad40f4d173f5b9d397503ca0077446ef460571138fac0f33f5ea'
'SKIP'
- '6561dfcd1c7ecc593b5d387796b01507fea7c1eb737196b880ac90c3ee561d4c7a803e2b21dc16d4c617ae116a7817465d99fa466398f53e4d7508ef8354110f')
+ '6561dfcd1c7ecc593b5d387796b01507fea7c1eb737196b880ac90c3ee561d4c7a803e2b21dc16d4c617ae116a7817465d99fa466398f53e4d7508ef8354110f'
+ '8572fa5b2dca2e4b1f366bf83cae7201b8131b64905bd6320440f7a0742a2a4f9f3da00edb6afb66d29e60c6c191d2e53c732d2b0ea47fb7c936818816c95ce4')
validpgpkeys=('153A37F10BBA0435987F2C4A72232973CA34C2C4')
@@ -51,6 +53,7 @@ package_mandos-server() {
_pinned_dependencies=(
)
_package server
+ install -m755 "${srcdir}/mandos.init" "${pkgdir}/etc/init.d/mandos"
}
package_mandos-client-nokey() {
diff --git a/mandos/mandos.init b/mandos/mandos.init
new file mode 100755
index 000000000..c01f6842d
--- /dev/null
+++ b/mandos/mandos.init
@@ -0,0 +1,29 @@
+#!/usr/bin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+start() {
+ ebegin "Starting mandos server"
+
+ start-stop-daemon --start -b \
+ --make-pidfile \
+ --pidfile /run/mandos.pid \
+ --exec /usr/bin/mandos -- \
+ --configdir /etc/mandos
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping mandos server"
+
+ start-stop-daemon --stop \
+ --pidfile /run/mandos.pid \
+ --retry=TERM/20/KILL/5
+
+ eend $?
+}