Revision 5984a712
b/snf-cyclades-gtools/conf/init.d/snf-ganeti-eventd | ||
---|---|---|
39 | 39 |
HOST=`/bin/hostname -f` |
40 | 40 |
|
41 | 41 |
if [ "x$MASTER" != x$HOST ]; then |
42 |
log_warning_msg "snf-ganeti-eventd should run on the ganeti master only, aborting start" |
|
42 |
log_warning_msg "snf-ganeti-eventd should run on the ganeti master only, aborting start (use 'force-start' if you know what you are doing)"
|
|
43 | 43 |
log_end_msg 0 |
44 | 44 |
exit 0 |
45 | 45 |
fi |
... | ... | |
85 | 85 |
fi |
86 | 86 |
fi |
87 | 87 |
;; |
88 |
force-start) |
|
89 |
if "$SNF_EVENTD_ENABLE"; then |
|
90 |
log_daemon_msg "Starting snf-ganeti-eventd daemon" "snf-ganeti-eventd" |
|
91 |
else |
|
92 |
if [ -s "$SNF_EVENTD_DEFAULTS" ]; then |
|
93 |
[ "$VERBOSE" != no ] && log_warning_msg "snf-ganeti-eventd daemon not enabled in $SNF_EVENTD_DEFAULTS, starting anyway" |
|
94 |
fi |
|
95 |
fi |
|
96 |
|
|
97 |
if [ -s $SNF_EVENTD_PID_FILE ] && kill -0 $(cat $SNF_EVENTD_PID_FILE) >/dev/null 2>&1; then |
|
98 |
log_progress_msg "apparently already running" |
|
99 |
log_end_msg 0 |
|
100 |
exit 0 |
|
101 |
fi |
|
102 |
eventd_start |
|
103 |
;; |
|
88 | 104 |
stop) |
89 | 105 |
log_daemon_msg "Stopping snf-ganeti-eventd daemon" "snf-ganeti-eventd" |
90 | 106 |
start-stop-daemon --stop --quiet --oknodo --pidfile $SNF_EVENTD_PID_FILE |
... | ... | |
117 | 133 |
exit $? # notreached due to set -e |
118 | 134 |
;; |
119 | 135 |
*) |
120 |
echo "Usage: /etc/init.d/snf-ganeti-eventd {start|stop|restart|status}" |
|
136 |
echo "Usage: /etc/init.d/snf-ganeti-eventd {start|stop|restart|force-start|status}"
|
|
121 | 137 |
exit 1 |
122 | 138 |
esac |
123 | 139 |
|
Also available in: Unified diff