From: | "Diego Petteno (flameeyes)" <flameeyes@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in www-apps/rt/files: rt.init.d.2 rt.conf.d.2 |
Date: | Fri, 18 Nov 2011 15:22:44 |
Message-Id: | 20111118152235.2AC7D2004B@flycatcher.gentoo.org |
1 | flameeyes 11/11/18 15:22:35 |
2 | |
3 | Added: rt.init.d.2 rt.conf.d.2 |
4 | Log: |
5 | Add a new revision with revised (no pun intended) init script, so that it actually seem to work and won't get stuck in an infinite loop if it fails to start. |
6 | |
7 | (Portage version: 2.2.0_alpha75/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 www-apps/rt/files/rt.init.d.2 |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/rt/files/rt.init.d.2?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/rt/files/rt.init.d.2?rev=1.1&content-type=text/plain |
14 | |
15 | Index: rt.init.d.2 |
16 | =================================================================== |
17 | #!/sbin/runscript |
18 | # Copyright 1999-2011 Gentoo Foundation |
19 | # Distributed under the terms of the GNU General Public License v2 |
20 | # $Header: /var/cvsroot/gentoo-x86/www-apps/rt/files/rt.init.d.2,v 1.1 2011/11/18 15:22:35 flameeyes Exp $ |
21 | |
22 | depend() { |
23 | use mysql postgresql lighttpd |
24 | } |
25 | |
26 | FCGI_SOCKET_PATH=${RTPATH}/var/appSocket |
27 | PIDFILE=${RTPATH}/var/pid |
28 | |
29 | start() { |
30 | checkpath -d "${RTPATH}/var" -m 0755 -o "${RTUSER}:${RTGROUP}" |
31 | |
32 | ebegin "Starting RT" |
33 | rm -f ${FCGI_SOCKET_PATH} |
34 | start-stop-daemon --start \ |
35 | --exec ${RTPATH}/bin/mason_handler.fcgi \ |
36 | --pidfile ${PIDFILE} --user "${RTUSER}:${RTGROUP}" \ |
37 | --background --make-pidfile --chdir ${RTPATH} \ |
38 | --stdout "${RTPATH}/var/service.log" \ |
39 | --stderr "${RTPATH}/var/service.log" \ |
40 | --env "PATH=$PATH" --env "FCGI_SOCKET_PATH=${FCGI_SOCKET_PATH}" \ |
41 | --wait 1500 |
42 | |
43 | if [ "$?" != "0" ]; then |
44 | eerror "${SVCNAME} failed to start. Please see ${RTPATH}/var/service.log for the reason." |
45 | eend 1 |
46 | return 1 |
47 | fi |
48 | |
49 | # make sure lighttpd can use the socket |
50 | for i in {0..10}; do |
51 | [ -a ${FCGI_SOCKET_PATH} ] && break |
52 | sleep 1 |
53 | done |
54 | |
55 | if [ -a ${FCGI_SOCKET_PATH} ]; then |
56 | chmod g+rwx ${FCGI_SOCKET_PATH} |
57 | eend 0 |
58 | else |
59 | eend 1 |
60 | fi |
61 | } |
62 | |
63 | stop() { |
64 | ebegin "Stopping RT" |
65 | start-stop-daemon --stop --pidfile ${PIDFILE} |
66 | eend $? |
67 | } |
68 | |
69 | |
70 | |
71 | 1.1 www-apps/rt/files/rt.conf.d.2 |
72 | |
73 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/rt/files/rt.conf.d.2?rev=1.1&view=markup |
74 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/rt/files/rt.conf.d.2?rev=1.1&content-type=text/plain |
75 | |
76 | Index: rt.conf.d.2 |
77 | =================================================================== |
78 | # Copyright 1999-2011 Gentoo Foundation |
79 | # Distributed under the terms of the GNU General Public License v2 |
80 | # $Header: /var/cvsroot/gentoo-x86/www-apps/rt/files/rt.conf.d.2,v 1.1 2011/11/18 15:22:35 flameeyes Exp $ |
81 | |
82 | # Config file for /etc/init.d/rt |
83 | |
84 | RTUSER=rt |
85 | RTGROUP=lighttpd |
86 | |
87 | # set RTPATH to rt's root |
88 | RTPATH=/var/www/localhost/@@PF@@ |