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
0270a5b1
Commit
0270a5b1
authored
4 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed user check in cron environment
parent
21e264ea
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
tester.py
+2
-2
2 additions, 2 deletions
tester.py
with
2 additions
and
2 deletions
tester.py
+
2
−
2
View file @
0270a5b1
...
...
@@ -107,7 +107,7 @@ class Tester:
log
(
"
USAGE:
"
+
self
.
USAGE
)
sys
.
exit
(
1
)
else
:
log
(
"
Optional target user
: %s
"
%
arg
)
log
(
"
Optional target user: %s
"
%
arg
)
if
not
os
.
path
.
isdir
(
os
.
path
.
join
(
"
/home
"
,
arg
)):
log
(
"
Mediaserver user %s does not exist
"
%
arg
)
sys
.
exit
(
1
)
...
...
@@ -123,7 +123,7 @@ class Tester:
sys
.
path
.
append
(
root_dir
)
# Check that this script is run by root
debug
=
"
-d
"
in
args
if
os
.
environ
.
get
(
"
USER
"
)
!=
"
root
"
and
not
debug
:
if
os
.
getuid
()
!=
0
and
not
debug
:
log
(
"
This script should be run as root user.
"
)
sys
.
exit
(
1
)
# Update envsetup files
...
...
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