Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P1867
/etc/init.d/phd
Active
Public
Actions
Authored by
joshuaspence
on Oct 15 2015, 1:58 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
Daemons
Referenced Files
F879918: /etc/init.d/phd
Oct 15 2015, 1:58 AM
2015-10-15 01:58:11 (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
'repository'
||
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:58 AM
2015-10-15 01:58:11 (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
bash
.
joshuaspence
added a project:
Daemons
.
joshuaspence
mentioned this in
Q176: Where should I run the repository pull daemon with `--no-discovery`
.
Log In to Comment