From 870d404836a0007ba108f6966efc5aeadee667ec Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 13 Oct 2024 16:37:40 +0200 Subject: mandos: write usable open-rc init script --- mandos/PKGBUILD | 9 ++++++--- mandos/mandos.init | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100755 mandos/mandos.init (limited to 'mandos') 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 $? +} -- cgit v1.2.3-70-g09d2