Commit 73304421 authored by Gabriel Monnerat's avatar Gabriel Monnerat

remove configuration in cloudooo.conf that executes the daemon with...

remove configuration in cloudooo.conf that executes the daemon with configuration file. The script cloudooo.sh is needed to send signal to server and stop the OpenOffice.org process.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@37673 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0d10a6f2
...@@ -39,23 +39,21 @@ Create Configuration File ...@@ -39,23 +39,21 @@ Create Configuration File
The configuration file is used to start the application using paster. The configuration file is used to start the application using paster.
$ cp ./cloudooo/samples/cloudooo.conf . # Copy to current folder $ cp ./cloudooo/samples/cloudooo.conf . # Copy to current folder
$ cp ./cloudooo/cloudooo ./cloudooo.sh
The next step is define some attributes in cloudooo.conf: The next step is define some attributes in cloudooo.conf:
- uno and soffice path; - uno and soffice path;
- python path; - python path;
- unomimemapper.py and unoconverter.py paths;# This files are created when setup.py is executed; - unomimemapper.py and unoconverter.py paths;# This files are created when setup.py is executed;
- user and group;
- paster path in first line;
After setting all configuration, give executable permission to this file. After setting all configuration, need pass to cloudooo script the paster and configutation file path.
So, replace $CONF_PATH and $PASTER_PATH to your machine paths.
$ chmod +x cloudooo.conf
Run Application Run Application
=============== ===============
$ ./cloudooo.conf start $ ./cloudooo.sh start
Description of Daemon Description of Daemon
......
#!/bin/sh #!/bin/sh
$PASTER_PATH="paster"
$CONF_PATH="./samples/cloudooo.conf"
lsb_functions="/etc/rc.d/init.d/functions" lsb_functions="/etc/rc.d/init.d/functions"
if test -f $lsb_functions ; then if test -f $lsb_functions ; then
. $lsb_functions . $lsb_functions
...@@ -23,13 +26,15 @@ SELF=$FOLDER$(basename $0) ...@@ -23,13 +26,15 @@ SELF=$FOLDER$(basename $0)
case "$1" in case "$1" in
start) start)
paster serve ./samples/cloudooo.conf --daemon;; $PASTER_PATH serve $CONF_PATH --daemon;;
stop) stop)
kill -1 `cat $CLOUDOOO_PID`; kill -1 `cat $CLOUDOOO_PID`;
paster serve ./samples/cloudooo.conf --stop-daemon;; $PASTER_PATH serve $CONF_PATH --stop-daemon;;
restart) restart)
$SELF stop; $SELF stop;
$SELF start;; $SELF start;;
fg)
$PASTER_PATH serve $CONF_PATH;;
*) *)
echo "Usage: ./cloudooo {start|stop|restart}"; echo "Usage: ./cloudooo {start|stop|restart}";
exit 1;; exit 1;;
......
#!/usr/bin/env paster
[app:main] [app:main]
use = egg:cloudooo use = egg:cloudooo
# #
...@@ -57,11 +56,3 @@ python_path = /usr/bin/python ...@@ -57,11 +56,3 @@ python_path = /usr/bin/python
use = egg:PasteScript#wsgiutils use = egg:PasteScript#wsgiutils
host = 0.0.0.0 host = 0.0.0.0
port = 8011 port = 8011
[exe]
command = serve
daemon = true
user = nobody
group = nobody
log-file = cloudooo.log
pid-file = cloudooo.pid
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment