##// END OF EJS Templates
Changed the managing script
Marcin Kuzminski -
r13:b6b3533a default
parent child Browse files
Show More
@@ -1,31 +1,31 b''
1 #!/bin/sh -e
1 #!/bin/sh -e
2 ### BEGIN INIT INFO
2 ### BEGIN INIT INFO
3 # Provides: pylons-manage
3 # Provides: pylons-manage
4 # Required-Start: $all
4 # Required-Start: $all
5 # Required-Stop: $all
5 # Required-Stop: $all
6 # Default-Start: 2 3 4 5
6 # Default-Start: 2 3 4 5
7 # Default-Stop: 0 1 6
7 # Default-Stop: 0 1 6
8 # Short-Description: starts pylons app
8 # Short-Description: starts pylons app
9 # Description: starts pylons app
9 # Description: starts pylons app
10 ### END INIT INFO
10 ### END INIT INFO
11
11
12 project_name=hg_app
12 project_name=hg_app
13 conf_name=development.ini
13 conf_name=production.ini
14 project_path=/home/marcink/python_workspace/$project_name
14 project_path=/home/marcink/python_workspace/$project_name
15 virt_python=/home/marcink/virt_python
15 virt_python=/home/marcink/virt_python
16
16
17 cd $project_path
17 cd $project_path
18 case "$1" in
18 case "$1" in
19 start)
19 start)
20 $virt_python/bin/paster serve --daemon --pid-file=$project_path/$project_name.pid --log-file=$project_path/$project_name.log $project_path/$conf_name start
20 $virt_python/bin/paster serve --daemon --pid-file=$project_path/$project_name.pid --log-file=$project_path/$project_name.log $project_path/$conf_name start
21 ;;
21 ;;
22 stop)
22 stop)
23 $virt_python/bin/paster serve --daemon --pid-file=$project_path/$project_name.pid --log-file=$project_path/$project_namete.log $project_path/$conf_name stop
23 $virt_python/bin/paster serve --daemon --pid-file=$project_path/$project_name.pid --log-file=$project_path/$project_namete.log $project_path/$conf_name stop
24 ;;
24 ;;
25 restart)
25 restart)
26 $virt_python/bin/paster serve --daemon --pid-file=$project_path/$project_name.pid --log-file=$project_path/$project_name.log $project_path/$conf_name restart
26 $virt_python/bin/paster serve --daemon --pid-file=$project_path/$project_name.pid --log-file=$project_path/$project_name.log $project_path/$conf_name restart
27 ;;
27 ;;
28 *)
28 *)
29 echo "Usage: $0 {start|stop|restart}"
29 echo "Usage: $0 {start|stop|restart}"
30 exit 1
30 exit 1
31 esac No newline at end of file
31 esac
General Comments 0
You need to be logged in to leave comments. Login now