Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
7c8aa669
Commit
7c8aa669
authored
Sep 10, 2013
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fix to account for template service names in systemctl
parent
6c3af4df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
library/system/service
+3
-1
No files found.
library/system/service
View file @
7c8aa669
...
...
@@ -397,7 +397,7 @@ class LinuxService(Service):
# adjust the service name to account for template service unit files
index
=
name
.
find
(
'@'
)
if
index
!=
-
1
:
name
=
name
[:
index
+
1
]
self
.
name
=
name
=
name
[:
index
+
1
]
look_for
=
"
%
s.service"
%
name
for
line
in
out
.
splitlines
():
...
...
@@ -419,6 +419,8 @@ class LinuxService(Service):
elif
os
.
path
.
exists
(
"/etc/init.d/
%
s"
%
self
.
name
):
# service is managed by with SysV init scripts, but with update-rc.d
self
.
enable_cmd
=
location
[
'update-rc.d'
]
else
:
self
.
module
.
fail_json
(
msg
=
"update-rc.d found but couldn't determine how the service is managed"
)
elif
location
.
get
(
'rc-service'
,
None
)
and
not
location
.
get
(
'systemctl'
,
None
):
# service is managed by OpenRC
self
.
svc_cmd
=
location
[
'rc-service'
]
...
...
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