Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P1866
/etc/init.d/phd
Active
Public
Actions
Authored by
joshuaspence
on Oct 15 2015, 1:57 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
Daemons
Referenced Files
F879912: /etc/init.d/phd
Oct 15 2015, 1:57 AM
2015-10-15 01:57:25 (UTC+0)
Subscribers
None
#!/bin/sh
### BEGIN INIT INFO
# Provides: phd
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Wrapper around the Phabricator Daemon launcher.
### END INIT INFO
NAME
=
"phd"
DAEMON
=
"/usr/src/phabricator/bin/
$NAME
"
DESC
=
"Phabricator Daemon launcher"
# Include defaults if available
if
[
-r /etc/default/phd
]
;
then
. /etc/default/phd
fi
# Exit if the package is not installed.
test
-x
$DAEMON
||
exit
0
# Load the VERBOSE setting and other rcS variables.
. /lib/init/vars.sh
# Define LSB log_* functions.
. /lib/lsb/init-functions
case
"
$1
"
in
start
)
$DAEMON
status --local >/dev/null
2
>
&
1
&&
{
echo
"Unable to start daemons because daemons are already running."
>
&
2
exit
1
}
$DAEMON
launch
'fact'
||
exit
$?
$DAEMON
launch
'trigger'
||
exit
$?
$DAEMON
launch
'taskmaster'
||
exit
$?
$DAEMON
launch
'repository'
-- --no-discovery
||
exit
$?
exit
0
;;
stop
)
$DAEMON
stop
||
exit
$?
exit
0
;;
status
)
$DAEMON
status --local
||
exit
$?
exit
0
;;
list
)
$DAEMON
list
||
exit
$?
exit
0
;;
restart
)
$0
stop
||
exit
$?
$0
start
||
exit
$?
exit
0
;;
*
)
echo
"Usage: /etc/init.d/
$NAME
{start|stop|status|list|restart}"
>
&
2
exit
1
;;
esac
exit
$RETVAL
Event Timeline
joshuaspence
edited the content of this paste.
(Show Details)
Oct 15 2015, 1:57 AM
2015-10-15 01:57:25 (UTC+0)
joshuaspence
changed the title of this paste from untitled to
/etc/init.d/phd
.
joshuaspence
updated the paste's language from
autodetect
to
autodetect
.
joshuaspence
added a project:
Daemons
.
joshuaspence
mentioned this in
Q176: Where should I run the repository pull daemon with `--no-discovery`
.
joshuaspence
updated the paste's language from
autodetect
to
bash
.
Oct 15 2015, 1:59 AM
2015-10-15 01:59:38 (UTC+0)
Log In to Comment