[DRE-commits] [unicorn] 02/03: Start daemon only if its config.rb exists
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Mon Nov 2 13:06:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
tsfgnu-guest pushed a commit to branch master
in repository unicorn.
commit a512d493d0a654686b753f5abc31d9e280c12935
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Wed Oct 7 15:23:38 2015 +0300
Start daemon only if its config.rb exists
---
debian/unicorn.init | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/debian/unicorn.init b/debian/unicorn.init
index f1dc774..61c87cd 100644
--- a/debian/unicorn.init
+++ b/debian/unicorn.init
@@ -36,10 +36,18 @@ exit_with_message() {
exit 0
}
+check_config_rb() {
+ if [ -s $CONFIG_RB ]; then
+ exit_with_message "Unicorn config.rb is missing (see /etc/default/unicorn)."
+ fi
+}
+
set -u
case "$1" in
start)
+ check_config_rb
+
log_daemon_msg "Starting $DESC" $NAME || true
if start-stop-daemon --start --quiet --oknodo --pidfile $PID --exec $DAEMON -- -D -c $CONFIG_RB $UNICORN_OPTS; then
log_end_msg 0 || true
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/unicorn.git
More information about the Pkg-ruby-extras-commits
mailing list