diff options
author | Beech Rintoul <beech@FreeBSD.org> | 2011-09-06 23:08:36 +0000 |
---|---|---|
committer | Beech Rintoul <beech@FreeBSD.org> | 2011-09-06 23:08:36 +0000 |
commit | ce5d2946b19968af335247b0a3479b9bebe0582f (patch) | |
tree | 9b5c4252d9faf89bc1548c76797ee35e7c844a0b /finance/openerp-server/files | |
parent | 7ddd5c11c03053809f0712f300c6c33e02a1bb32 (diff) |
- Update To 6.0.3
PR: ports/160310
Submitted by: Laurent Berthelet <laurent@ospowa.com> (maintainer)
Notes
Notes:
svn path=/head/; revision=281326
Diffstat (limited to 'finance/openerp-server/files')
-rw-r--r-- | finance/openerp-server/files/openerpd.in | 39 | ||||
-rw-r--r-- | finance/openerp-server/files/patch-setup.py | 46 |
2 files changed, 64 insertions, 21 deletions
diff --git a/finance/openerp-server/files/openerpd.in b/finance/openerp-server/files/openerpd.in index 6e0e845b73d9..0d70d634c473 100644 --- a/finance/openerp-server/files/openerpd.in +++ b/finance/openerp-server/files/openerpd.in @@ -26,9 +26,48 @@ load_rc_config $name : ${openerpd_enable="NO"} : ${openerpd_config="%%PREFIX%%/etc/openerp-server.conf"} +: ${openerpd_user="openerpd"} + +openerpd_pidfile=${openerpd_pidfile:-"/var/run/openerp-server/openerpd.pid"} +openerpd_config=${openerpd_config:-"/usr/local/etc/openerpd.conf"} +openerpd_flags=${openerpd_flags:-"--config=${openerpd_config}"} required_files="$openerpd_config" +start_precmd="${name}_prestart" +stop_cmd="${name}_stop" + +openerpd_prestart() +{ + if [ ! -d `dirname ${openerpd_pidfile}` ] + then + mkdir -p `dirname ${openerpweb_pidfile}` + fi + chown ${openerpd_user} `dirname ${openerpd_pidfile}` +} + +openerpd_stop() +{ + # ensure the server is stopped + if [ -f ${openerpd_pidfile} ] + then + echo "Stopping ${name}." + kill -15 `cat ${openerpd_pidfile}` + else + openerpd_pid=`pgrep -f "openerp-server.py ${openerpd_flags}"` + if [ ${openerpd_pid} ] + then + echo "Stopping ${name}." + kill -15 ${openerpd_pid} + else + echo "${name} not running? (pidfile not found)" + fi + fi +} + + + command_args="-c $openerpd_config >/dev/null 2>&1 &" +load_rc_config $name run_rc_command "$1" diff --git a/finance/openerp-server/files/patch-setup.py b/finance/openerp-server/files/patch-setup.py index ad7163265b0c..654e6588a640 100644 --- a/finance/openerp-server/files/patch-setup.py +++ b/finance/openerp-server/files/patch-setup.py @@ -1,25 +1,29 @@ ---- setup.py.orig 2009-02-09 20:32:57.000000000 +0800 -+++ setup.py 2009-02-09 20:33:48.000000000 +0800 -@@ -92,14 +92,14 @@ - opj('bin', 'server.pkey'), - opj('bin', 'server.cert')])) +--- setup.py 2011-08-21 16:34:59.526991138 +0200 ++++ setup.diffs 2011-08-21 16:35:49.515560426 +0200 +@@ -145,16 +145,16 @@ + # files.append((root, [join(root, name) for name in names])) + files.append(('.', [join('bin', 'import_xml.rng'),])) else: -- man_directory = opj('share', 'man') -- files.append((opj(man_directory, 'man1'), ['man/openerp-server.1'])) -- files.append((opj(man_directory, 'man5'), ['man/openerp_serverrc.5'])) +- man_directory = join('share', 'man') +- files.append((join(man_directory, 'man1'), ['man/openerp-server.1'])) +- files.append((join(man_directory, 'man5'), ['man/openerp_serverrc.5'])) - -- doc_directory = opj('share', 'doc', 'openerp-server-%s' % version) -- files.append((doc_directory, [f for f in glob.glob('doc/*') if os.path.isfile(f)])) -- files.append((opj(doc_directory, 'migrate', '3.3.0-3.4.0'), [f for f in glob.glob('doc/migrate/3.3.0-3.4.0/*') if os.path.isfile(f)])) -- files.append((opj(doc_directory, 'migrate', '3.4.0-4.0.0'), [f for f in glob.glob('doc/migrate/3.4.0-4.0.0/*') if os.path.isfile(f)])) -+# man_directory = opj('share', 'man') -+# files.append((opj(man_directory, 'man1'), ['man/openerp-server.1'])) -+# files.append((opj(man_directory, 'man5'), ['man/openerp_serverrc.5'])) -+ -+# doc_directory = opj('share', 'doc', 'openerp-server-%s' % version) -+# files.append((doc_directory, [f for f in glob.glob('doc/*') if os.path.isfile(f)])) -+# files.append((opj(doc_directory, 'migrate', '3.3.0-3.4.0'), [f for f in glob.glob('doc/migrate/3.3.0-3.4.0/*') if os.path.isfile(f)])) -+# files.append((opj(doc_directory, 'migrate', '3.4.0-4.0.0'), [f for f in glob.glob('doc/migrate/3.4.0-4.0.0/*') if os.path.isfile(f)])) +- doc_directory = join('share', 'doc', 'openerp-server-%s' % version) +- files.append((doc_directory, filter(isfile, glob.glob('doc/*')))) +- files.append((join(doc_directory, 'migrate', '3.3.0-3.4.0'), +- filter(isfile, glob.glob('doc/migrate/3.3.0-3.4.0/*')))) +- files.append((join(doc_directory, 'migrate', '3.4.0-4.0.0'), +- filter(isfile, glob.glob('doc/migrate/3.4.0-4.0.0/*')))) ++# man_directory = join('share', 'man') ++# files.append((join(man_directory, 'man1'), ['man/openerp-server.1'])) ++# files.append((join(man_directory, 'man5'), ['man/openerp_serverrc.5'])) ++# ++# doc_directory = join('share', 'doc', 'openerp-server-%s' % version) ++# files.append((doc_directory, filter(isfile, glob.glob('doc/*')))) ++# files.append((join(doc_directory, 'migrate', '3.3.0-3.4.0'), ++# filter(isfile, glob.glob('doc/migrate/3.3.0-3.4.0/*')))) ++# files.append((join(doc_directory, 'migrate', '3.4.0-4.0.0'), ++# filter(isfile, glob.glob('doc/migrate/3.4.0-4.0.0/*')))) - openerp_site_packages = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server') + openerp_site_packages = join(get_python_lib(prefix=''), 'openerp-server') |