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): ...@@ -335,8 +335,6 @@ def prepare_scripts (config):
else: else:
slapos_configuration='/etc/opt/slapos/' slapos_configuration='/etc/opt/slapos/'
remove_former_scripts(slapos_configuration)
# Creating boot script # Creating boot script
path = os.path.join('/','usr','sbin', 'slapos-boot-dedicated') path = os.path.join('/','usr','sbin', 'slapos-boot-dedicated')
print "Creating %r" % path print "Creating %r" % path
...@@ -358,26 +356,8 @@ def prepare_scripts (config): ...@@ -358,26 +356,8 @@ def prepare_scripts (config):
% dict(slapos_configuration=slapos_configuration)) % dict(slapos_configuration=slapos_configuration))
os.chmod(path, 0755) os.chmod(path, 0755)
# Preparing retry slapformat script # Remove old-timers scripts
path = os.path.join(slapos_configuration,'run_slapformat') remove_former_scripts(slapos_configuration)
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)
......
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