summaryrefslogtreecommitdiff
path: root/sci-mathematics/gimps/files/gimps-28.9-init.d
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-mathematics/gimps/files/gimps-28.9-init.d
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-mathematics/gimps/files/gimps-28.9-init.d')
-rw-r--r--sci-mathematics/gimps/files/gimps-28.9-init.d32
1 files changed, 32 insertions, 0 deletions
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 $?
+}