Minor updates.
This commit is contained in:
parent
13f3400577
commit
6d0549e6ce
|
@ -6,7 +6,7 @@
|
||||||
import os, os.path, sys, shutil, re
|
import os, os.path, sys, shutil, re
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
from appy.shared.utils import cleanFolder, copyFolder
|
from appy.shared.utils import cleanFolder, copyFolder
|
||||||
from appy.shared.packaging import ooStartSh, zopeConf
|
from appy.shared.packaging import ooStart, zopeConf
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
class NewError(Exception): pass
|
class NewError(Exception): pass
|
||||||
|
@ -114,7 +114,7 @@ class ZopeInstanceCreator:
|
||||||
os.chmod('bin/runzope', 0744) # Make it executable by owner.
|
os.chmod('bin/runzope', 0744) # Make it executable by owner.
|
||||||
# Create bin/startoo
|
# Create bin/startoo
|
||||||
f = file('bin/startoo', 'w')
|
f = file('bin/startoo', 'w')
|
||||||
f.write(ooStartSh)
|
f.write(ooStart)
|
||||||
f.close()
|
f.close()
|
||||||
os.chmod('bin/startoo', 0744) # Make it executable by owner.
|
os.chmod('bin/startoo', 0744) # Make it executable by owner.
|
||||||
# Create etc/zope.conf
|
# Create etc/zope.conf
|
||||||
|
|
|
@ -2150,7 +2150,7 @@ class Pod(Type):
|
||||||
tempFileName = '%s/%s_%f.%s' % (
|
tempFileName = '%s/%s_%f.%s' % (
|
||||||
getOsTempFolder(), obj.uid, time.time(), outputFormat)
|
getOsTempFolder(), obj.uid, time.time(), outputFormat)
|
||||||
# Define parameters to give to the appy.pod renderer
|
# Define parameters to give to the appy.pod renderer
|
||||||
podContext = {'tool': tool, 'user': obj.user, 'self': obj,
|
podContext = {'tool': tool, 'user': obj.user, 'self': obj, 'field':self,
|
||||||
'now': obj.o.getProductConfig().DateTime(),
|
'now': obj.o.getProductConfig().DateTime(),
|
||||||
'_': obj.translate, 'projectFolder': tool.getDiskFolder()}
|
'_': obj.translate, 'projectFolder': tool.getDiskFolder()}
|
||||||
# If the POD document is related to a query, get it from the request,
|
# If the POD document is related to a query, get it from the request,
|
||||||
|
|
|
@ -24,9 +24,8 @@ ZopeRunner().run()
|
||||||
appRun = '''#! /bin/sh
|
appRun = '''#! /bin/sh
|
||||||
exec "/usr/lib/zope2.12/bin/runzope" -C "/etc/%s.conf" "$@"
|
exec "/usr/lib/zope2.12/bin/runzope" -C "/etc/%s.conf" "$@"
|
||||||
'''
|
'''
|
||||||
ooStart = 'soffice -invisible -headless -nofirststartwizard ' \
|
ooStart = '#! /bin/sh\nsoffice -invisible -headless -nofirststartwizard ' \
|
||||||
'"-accept=socket,host=localhost,port=2002;urp;"'
|
'"-accept=socket,host=localhost,port=2002;urp;"'
|
||||||
ooStartSh = '#! /bin/sh\n%s\n' % ooStart
|
|
||||||
zopeConf = '''# Zope configuration.
|
zopeConf = '''# Zope configuration.
|
||||||
%%define INSTANCE %s
|
%%define INSTANCE %s
|
||||||
%%define DATA %s
|
%%define DATA %s
|
||||||
|
@ -80,7 +79,7 @@ initScript = '''#! /bin/sh
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: Start %s
|
# Short-Description: Start %s
|
||||||
# Description: Start the Zope and Appy-based %s application.
|
# Description: %s
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -172,7 +171,7 @@ class Debianizer:
|
||||||
# startoo
|
# startoo
|
||||||
name = '%s/startoo' % binFolder
|
name = '%s/startoo' % binFolder
|
||||||
f = file(name, 'w')
|
f = file(name, 'w')
|
||||||
f.write(ooStartSh)
|
f.write(ooStart)
|
||||||
f.close()
|
f.close()
|
||||||
os.chmod(name, 0744) # Make it executable by owner.
|
os.chmod(name, 0744) # Make it executable by owner.
|
||||||
# /var/lib/<app> (will store Data.fs, lock files, etc)
|
# /var/lib/<app> (will store Data.fs, lock files, etc)
|
||||||
|
@ -205,7 +204,7 @@ class Debianizer:
|
||||||
name = '%s/%s' % (initdFolder, self.appNameLower)
|
name = '%s/%s' % (initdFolder, self.appNameLower)
|
||||||
f = file(name, 'w')
|
f = file(name, 'w')
|
||||||
n = self.appNameLower
|
n = self.appNameLower
|
||||||
f.write(initScript % (n, n, 'Start the Zope and Appy-based %s ' \
|
f.write(initScript % (n, n, 'Start Zope with the Appy-based %s ' \
|
||||||
'application.' % n, '%sctl start' % n,
|
'application.' % n, '%sctl start' % n,
|
||||||
'%sctl restart' % n, '%sctl stop' % n))
|
'%sctl restart' % n, '%sctl stop' % n))
|
||||||
f.close()
|
f.close()
|
||||||
|
@ -214,7 +213,7 @@ class Debianizer:
|
||||||
name = '%s/oo' % initdFolder
|
name = '%s/oo' % initdFolder
|
||||||
f = file(name, 'w')
|
f = file(name, 'w')
|
||||||
f.write(initScript % ('oo', 'oo', 'Start OpenOffice in server mode',
|
f.write(initScript % ('oo', 'oo', 'Start OpenOffice in server mode',
|
||||||
ooStart, ooStart, "#Can't stop OO."))
|
'startoo', 'startoo', "#Can't stop OO."))
|
||||||
f.close()
|
f.close()
|
||||||
os.chmod(name, 0744) # Make it executable by owner.
|
os.chmod(name, 0744) # Make it executable by owner.
|
||||||
# Get the size of the app, in Kb.
|
# Get the size of the app, in Kb.
|
||||||
|
|
Loading…
Reference in a new issue