Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Francois Le Corre
slapos.package
Commits
e945f936
Commit
e945f936
authored
Sep 14, 2012
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Former script are removed after adding new ones
parent
2c0a33ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
53 deletions
+33
-53
slapprepare/slapprepare/__init__.py
slapprepare/slapprepare/__init__.py
+33
-53
No files found.
slapprepare/slapprepare/__init__.py
View file @
e945f936
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment