326
326
# Write lib/conf/conf.py
329
conf = open(conffile, "w")
328
conf = open(conffile, "w")
331
conf.write("""# IVLE Configuration File
330
conf.write("""# IVLE Configuration File
333
332
# Miscellaneous application settings
338
for opt in config_options:
339
conf.write('%s\n%s = %r\n' % (opt.comment, opt.option_name,
340
globals()[opt.option_name]))
342
# Add the forum secret to the config file (regenerated each config)
343
conf.write('forum_secret = "%s"\n\n' % (forum_secret))
345
write_conf_file_boilerplate(conf)
348
except IOError, (errno, strerror):
349
print "IO error(%s): %s" % (errno, strerror)
337
for opt in config_options:
338
conf.write('%s\n%s = %r\n' % (opt.comment, opt.option_name,
339
globals()[opt.option_name]))
341
# Add the forum secret to the config file (regenerated each config)
342
conf.write('forum_secret = "%s"\n\n' % (forum_secret))
344
write_conf_file_boilerplate(conf)
352
348
print "Successfully wrote %s" % conffile
354
350
# Write bin/trampoline/conf.h
357
conf = open(conf_hfile, "w")
359
# XXX Compute jail_base, jail_src_base and jail_system. These will
360
# ALSO be done by the boilerplate code, but we need them here in order
361
# to write to the C file.
362
jail_base = os.path.join(data_path, 'jailmounts')
363
jail_src_base = os.path.join(data_path, 'jails')
364
jail_system = os.path.join(jail_src_base, '__base__')
366
conf.write("""/* IVLE Configuration File
352
conf = open(conf_hfile, "w")
354
# XXX Compute jail_base, jail_src_base and jail_system. These will
355
# ALSO be done by the boilerplate code, but we need them here in order
356
# to write to the C file.
357
jail_base = os.path.join(data_path, 'jailmounts')
358
jail_src_base = os.path.join(data_path, 'jails')
359
jail_system = os.path.join(jail_src_base, '__base__')
361
conf.write("""/* IVLE Configuration File
368
363
* Administrator settings required by trampoline.
369
364
* Note: trampoline will have to be rebuilt in order for changes to this file
391
386
# However they should be the same with the exception of the outer
392
387
# characters, which are stripped off and replaced
395
except IOError, (errno, strerror):
396
print "IO error(%s): %s" % (errno, strerror)
399
391
print "Successfully wrote %s" % conf_hfile
401
393
# Write www/php/phpBB3/config.php
404
conf = open(phpBBconffile, "w")
407
if db_host == 'localhost':
408
forumdb_host = '127.0.0.1'
410
forumdb_host = db_host
395
conf = open(phpBBconffile, "w")
398
if db_host == 'localhost':
399
forumdb_host = '127.0.0.1'
401
forumdb_host = db_host
413
404
// phpBB 3.0.x auto-generated configuration file
414
405
// Do not change anything in this file!
415
406
$dbms = 'postgres';