appy.shared: improvements in Debianizing an Appy app: the Debian install creates now scripts for starting the Zope/Appy/app instance and OpenOffice in server mode at boot time.
This commit is contained in:
parent
1275df5753
commit
cb53c6b9b2
3 changed files with 64 additions and 7 deletions
|
@ -6,7 +6,7 @@
|
|||
import os, os.path, sys, shutil, re
|
||||
from optparse import OptionParser
|
||||
from appy.shared.utils import cleanFolder, copyFolder
|
||||
from appy.shared.packaging import ooStart, zopeConf
|
||||
from appy.shared.packaging import ooStartSh, zopeConf
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
class NewError(Exception): pass
|
||||
|
@ -114,7 +114,7 @@ class ZopeInstanceCreator:
|
|||
os.chmod('bin/runzope', 0744) # Make it executable by owner.
|
||||
# Create bin/startoo
|
||||
f = file('bin/startoo', 'w')
|
||||
f.write(ooStart)
|
||||
f.write(ooStartSh)
|
||||
f.close()
|
||||
os.chmod('bin/startoo', 0744) # Make it executable by owner.
|
||||
# Create etc/zope.conf
|
||||
|
|
|
@ -17,6 +17,7 @@ class ZopeRunner:
|
|||
options = zctl.ZopeCtlOptions()
|
||||
options.realize(None)
|
||||
options.program = ['/usr/bin/%srun' % app]
|
||||
options.sockname = '/var/lib/%s/zopectlsock' % app
|
||||
c = zctl.ZopeCmd(options)
|
||||
c.onecmd(" ".join(options.args))
|
||||
return min(c._exitstatus, 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue