From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-mathematics/gimps/files/gimps-28.9-init.d | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sci-mathematics/gimps/files/gimps-28.9-init.d (limited to 'sci-mathematics/gimps/files/gimps-28.9-init.d') diff --git a/sci-mathematics/gimps/files/gimps-28.9-init.d b/sci-mathematics/gimps/files/gimps-28.9-init.d new file mode 100644 index 000000000000..00eca8268055 --- /dev/null +++ b/sci-mathematics/gimps/files/gimps-28.9-init.d @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +checkconfig() { + checkpath -d -o ${USER}:${GROUP} ${GIMPS_DIR} + + if [ ! -e "${GIMPS_DIR}/local.txt" ]; then + eerror "GIMPS has not been configured. Please configure it manually before" + eerror "starting this initscript." + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting GIMPS" + start-stop-daemon --quiet --start -b --exec /opt/gimps/mprime \ + --chdir ${GIMPS_DIR} --user ${USER}:${GROUP} \ + -- -w${GIMPS_DIR} ${GIMPS_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping GIMPS" + start-stop-daemon --quiet --stop --exec /opt/gimps/mprime + eend $? +} -- cgit v1.2.3