Commit e945f936 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Former script are removed after adding new ones

parent 2c0a33ce
......@@ -335,8 +335,6 @@ def prepare_scripts (config):
else:
slapos_configuration='/etc/opt/slapos/'
remove_former_scripts(slapos_configuration)
# Creating boot script
path = os.path.join('/','usr','sbin', 'slapos-boot-dedicated')
print "Creating %r" % path
......@@ -358,26 +356,8 @@ def prepare_scripts (config):
% dict(slapos_configuration=slapos_configuration))
os.chmod(path, 0755)
# Preparing retry slapformat script
path = os.path.join(slapos_configuration,'run_slapformat')
print "Creating %r" % path
if not dry_run:
open(path, 'w').write(
pkg_resources.resource_stream(__name__,
'script/%s' % 'run_slapformat').read()
% dict(slapos_configuration=slapos_configuration))
os.chmod(path, 0755)
path = os.path.join('/','etc','openvpn','client.conf')
print "Creating %r" % path
if not dry_run:
open(path, 'a').write(
"""script-security 3 system
up-restart
up '/bin/bash %(slapos_configuration)s/run_slapformat & echo foo'
log /var/log/openvpn.log"""
% dict(slapos_configuration=slapos_configuration))
os.chmod(path, 0755)
# Remove old-timers scripts
remove_former_scripts(slapos_configuration)
......
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