From 9296ed69e613d5aaa46d0371e4ba2e56aa79fadb Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Thu, 21 Aug 2014 12:11:53 -0300 Subject: oops, typo: deamon -> daemon --- service/user-agent-daemon | 33 +++++++++++++++++++++++++++++++++ service/user-agent-deamon | 33 --------------------------------- 2 files changed, 33 insertions(+), 33 deletions(-) create mode 100755 service/user-agent-daemon delete mode 100755 service/user-agent-deamon (limited to 'service') diff --git a/service/user-agent-daemon b/service/user-agent-daemon new file mode 100755 index 00000000..84493d2d --- /dev/null +++ b/service/user-agent-daemon @@ -0,0 +1,33 @@ +#!/bin/bash +export PYTHONPATH=`pwd`/app:$PYTHONPATH + +USER_AGENT_PORT=3333 + +function do_stop() { + test -e gunicorn.pid && (kill -9 $(cat gunicorn.pid) && rm gunicorn.pid && echo "Stopped User Agent") || echo "User Agent is not running" +} + +function do_start() { + echo "gunicorn pixelated_user_agent:app -b 0.0.0.0:$USER_AGENT_PORT -D -p gunicorn.pid --log-file=gunicorn.log" + gunicorn pixelated_user_agent:app -b 0.0.0.0:$USER_AGENT_PORT -D -p gunicorn.pid --log-file=gunicorn.log +} + +case $1 in + restart) + do_stop && do_start + ;; + start) + do_start + ;; + stop) + do_stop + ;; + killall) + pgrep -f gunicorn | xargs kill -9 + rm -rf gunicorn.pid + ;; + *) + echo "usage: start|stop|restart|killall" + ;; +esac + diff --git a/service/user-agent-deamon b/service/user-agent-deamon deleted file mode 100755 index 84493d2d..00000000 --- a/service/user-agent-deamon +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -export PYTHONPATH=`pwd`/app:$PYTHONPATH - -USER_AGENT_PORT=3333 - -function do_stop() { - test -e gunicorn.pid && (kill -9 $(cat gunicorn.pid) && rm gunicorn.pid && echo "Stopped User Agent") || echo "User Agent is not running" -} - -function do_start() { - echo "gunicorn pixelated_user_agent:app -b 0.0.0.0:$USER_AGENT_PORT -D -p gunicorn.pid --log-file=gunicorn.log" - gunicorn pixelated_user_agent:app -b 0.0.0.0:$USER_AGENT_PORT -D -p gunicorn.pid --log-file=gunicorn.log -} - -case $1 in - restart) - do_stop && do_start - ;; - start) - do_start - ;; - stop) - do_stop - ;; - killall) - pgrep -f gunicorn | xargs kill -9 - rm -rf gunicorn.pid - ;; - *) - echo "usage: start|stop|restart|killall" - ;; -esac - -- cgit v1.2.3