Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
89c166b2
Verified
Commit
89c166b2
authored
6 years ago
by
Nicolas KAROLAK
Browse files
Options
Downloads
Patches
Plain Diff
check presence of nscd
parent
ae483270
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
set_app_domain.py
+8
-1
8 additions, 1 deletion
set_app_domain.py
with
8 additions
and
1 deletion
set_app_domain.py
+
8
−
1
View file @
89c166b2
...
...
@@ -3,6 +3,7 @@
'''
Script to set the domain of an existing MediaServer, Miris Manager or Monitor
'''
import
apt
import
os
import
re
import
subprocess
...
...
@@ -162,7 +163,13 @@ class SetAppDomain():
with
open
(
'
/etc/hosts
'
,
'
w
'
)
as
fo
:
fo
.
write
(
new_hosts
)
log
(
'
The
"
/etc/hosts
"
file has been update.
'
)
utils
.
run_commands
([
'
service nscd restart
'
])
cache
=
apt
.
Cache
()
cache
.
open
()
try
:
cache
[
'
nscd
'
].
is_installed
utils
.
run_commands
([
'
service nscd restart
'
])
except
KeyError
:
pass
else
:
log
(
'
The
"
/etc/hosts
"
file is already up to date.
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment