diff options
author | Dennis Przytarski <dennis@przytarski.com> | 2014-08-20 06:37:48 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-25 06:36:15 +0000 |
commit | ea9eb8fce3c244c12d7ae007def19847229f680b (patch) | |
tree | c8f06e4aa5edce7e2be77ab0c8df580768ca4aac /testing/tengine/tengine.initd | |
parent | 5857d68a098f3cc8dafff4c0e84b940b4a21ef1b (diff) | |
download | aports-ea9eb8fce3c244c12d7ae007def19847229f680b.tar.bz2 aports-ea9eb8fce3c244c12d7ae007def19847229f680b.tar.xz |
testing/tengine: fix install
Diffstat (limited to 'testing/tengine/tengine.initd')
-rw-r--r-- | testing/tengine/tengine.initd | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/testing/tengine/tengine.initd b/testing/tengine/tengine.initd index 7e82a56f7..54b988ff0 100644 --- a/testing/tengine/tengine.initd +++ b/testing/tengine/tengine.initd @@ -13,52 +13,52 @@ depend() { start() { configtest || return 1 - ebegin "Starting nginx" - start-stop-daemon --start --pidfile /var/run/nginx.pid \ - --exec /usr/sbin/nginx -- -c /etc/nginx/nginx.conf - eend $? "Failed to start nginx" + ebegin "Starting tengine" + start-stop-daemon --start --pidfile /var/run/tengine.pid \ + --exec /usr/sbin/tengine -- -c /etc/tengine/tengine.conf + eend $? "Failed to start tengine" } stop() { configtest || return 1 - ebegin "Stopping nginx" - start-stop-daemon --stop --pidfile /var/run/nginx.pid - eend $? "Failed to stop nginx" - rm -f /var/run/nginx.pid + ebegin "Stopping tengine" + start-stop-daemon --stop --pidfile /var/run/tengine.pid + eend $? "Failed to stop tengine" + rm -f /var/run/tengine.pid } reload() { configtest || return 1 - ebegin "Refreshing nginx' configuration" - kill -HUP `cat /var/run/nginx.pid` &>/dev/null - eend $? "Failed to reload nginx" + ebegin "Refreshing tengine' configuration" + kill -HUP `cat /var/run/tengine.pid` &>/dev/null + eend $? "Failed to reload tengine" } upgrade() { configtest || return 1 - ebegin "Upgrading nginx" + ebegin "Upgrading tengine" einfo "Sending USR2 to old binary" - kill -USR2 `cat /var/run/nginx.pid` &>/dev/null + kill -USR2 `cat /var/run/tengine.pid` &>/dev/null einfo "Sleeping 3 seconds before pid-files checking" sleep 3 - if [ ! -f /var/run/nginx.pid.oldbin ]; then + if [ ! -f /var/run/tengine.pid.oldbin ]; then eerror "File with old pid not found" return 1 fi - if [ ! -f /var/run/nginx.pid ]; then + if [ ! -f /var/run/tengine.pid ]; then eerror "New binary failed to start" return 1 fi einfo "Sleeping 3 seconds before WINCH" - sleep 3 ; kill -WINCH `cat /var/run/nginx.pid.oldbin` + sleep 3 ; kill -WINCH `cat /var/run/tengine.pid.oldbin` einfo "Sending QUIT to old binary" - kill -QUIT `cat /var/run/nginx.pid.oldbin` + kill -QUIT `cat /var/run/tengine.pid.oldbin` einfo "Upgrade completed" @@ -66,8 +66,8 @@ upgrade() { } configtest() { - ebegin "Checking nginx' configuration" - mkdir -p /tmp/nginx - /usr/sbin/nginx -c /etc/nginx/nginx.conf -t + ebegin "Checking tengine' configuration" + mkdir -p /tmp/tengine + /usr/sbin/tengine -c /etc/tengine/tengine.conf -t eend $? "failed, please correct errors above" } |