/[gentoo-x86]/sci-mathematics/gimps/files/gimps-26.6-r1-init.d
Gentoo

Contents of /sci-mathematics/gimps/files/gimps-26.6-r1-init.d

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Tue Dec 6 16:42:52 2011 UTC (8 years, 3 months ago) by tomka
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-dsrc
Don't use deprecated options of start-stop-daemon (Bug 393353). Thanks Paolo
Pedroni.

(Portage version: 2.1.10.39/cvs/Linux x86_64)

1 #!/sbin/runscript
2 # Copyright 1999-2011 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 depend() {
6 need net
7 }
8
9 checkconfig() {
10 if [ ! -e "${GIMPS_DIR}" ]; then
11 einfo "Creating ${GIMPS_DIR}"
12 /bin/mkdir "${GIMPS_DIR}"
13 fi
14
15 /bin/chown -R ${USER}:${GROUP} ${GIMPS_DIR}
16
17 if [ ! -e "${GIMPS_DIR}/local.txt" ]; then
18 eerror "GIMPS has not been configured. Please configure it manually before"
19 eerror "starting this initscript."
20 return 1
21 fi
22 }
23
24 start() {
25 checkconfig || return 1
26 ebegin "Starting GIMPS"
27 start-stop-daemon --quiet --start -b --exec /opt/gimps/mprime \
28 --chdir ${GIMPS_DIR} --user ${USER}:${GROUP} \
29 -- -w${GIMPS_DIR} ${GIMPS_OPTIONS}
30 eend $?
31 }
32
33 stop() {
34 ebegin "Stopping GIMPS"
35 start-stop-daemon --quiet --stop --exec /opt/gimps/mprime
36 eend $?
37 }

  ViewVC Help
Powered by ViewVC 1.1.20