Mercurial > kallithea
annotate manage-hg_app @ 331:a9a6c74ad2a6
added ip loggin into mercurial middleware
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 01 Jul 2010 20:10:22 +0200 |
parents | 7f88d7088f9c |
children |
rev | line source |
---|---|
12 | 1 #!/bin/sh -e |
2 ### BEGIN INIT INFO | |
38 | 3 # Provides: manage-hg_app |
12 | 4 # Required-Start: $all |
5 # Required-Stop: $all | |
6 # Default-Start: 2 3 4 5 | |
7 # Default-Stop: 0 1 6 | |
8 # Short-Description: starts pylons app | |
9 # Description: starts pylons app | |
10 ### END INIT INFO | |
11 | |
12 project_name=hg_app | |
13 | 13 conf_name=production.ini |
12 | 14 project_path=/home/marcink/python_workspace/$project_name |
19 | 15 pid_path=$project_path |
16 log_path=$project_path | |
12 | 17 virt_python=/home/marcink/virt_python |
19 | 18 run_user=root |
19 run_group=root | |
12 | 20 |
21 cd $project_path | |
22 case "$1" in | |
23 start) | |
30
424167fefd6c
manage script error fix
Marcin Kuzminski <marcin@python-blog.com>
parents:
19
diff
changeset
|
24 $virt_python/bin/paster serve --daemon --user=$run_user --group=$run_group --pid-file=$pid_path/$project_name.pid --log-file=$log_path/$project_name.log $project_path/$conf_name start |
12 | 25 ;; |
26 stop) | |
30
424167fefd6c
manage script error fix
Marcin Kuzminski <marcin@python-blog.com>
parents:
19
diff
changeset
|
27 $virt_python/bin/paster serve --daemon --user=$run_user --group=$run_group --pid-file=$pid_path/$project_name.pid --log-file=$log_path/$project_namete.log $project_path/$conf_name stop |
12 | 28 ;; |
29 restart) | |
30
424167fefd6c
manage script error fix
Marcin Kuzminski <marcin@python-blog.com>
parents:
19
diff
changeset
|
30 $virt_python/bin/paster serve --daemon --user=$run_user --group=$run_group --pid-file=$pid_path/$project_name.pid --log-file=$log_path/$project_name.log $project_path/$conf_name restart |
12 | 31 ;; |
32 *) | |
33 echo "Usage: $0 {start|stop|restart}" | |
34 exit 1 | |
35 esac |