Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
storjstatus-client
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
James Coyle
storjstatus-client
Commits
123c36a7
Commit
123c36a7
authored
Apr 06, 2018
by
James Coyle
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'james-dev' into 'master'
Fix for user level detection See merge request
!16
parents
cd653f86
74d2a784
Pipeline
#1260
passed with stages
in 57 minutes and 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
storjstatus/storjstatus_register.py
storjstatus/storjstatus_register.py
+13
-12
storjstatus/version.py
storjstatus/version.py
+1
-1
No files found.
storjstatus/storjstatus_register.py
View file @
123c36a7
...
@@ -97,20 +97,21 @@ def init_register():
...
@@ -97,20 +97,21 @@ def init_register():
def
checks
():
def
checks
():
global
FORCE
global
FORCE
if
storjstatus_common
.
get_os_type
()
==
"x"
:
if
storjstatus_common
.
get_os_type
()
==
"linux"
:
try
:
if
os
.
geteuid
()
!=
0
:
print_error
(
'Please run this script with root privileges.'
)
except
AttributeError
:
print_error
(
'Error checking user access level.'
)
elif
storjstatus_common
.
get_os_type
()
==
"win"
:
try
:
if
ctypes
.
windll
.
shell32
.
IsUserAnAdmin
()
!=
1
:
print_error
(
'Please run this script with Administrator privileges.'
)
except
AttributeError
:
print_error
(
'Error checking user access level.'
)
else
:
print_error
(
'Unsupported Os type.'
)
print_error
(
'Unsupported Os type.'
)
try
:
if
os
.
geteuid
()
!=
0
:
print_error
(
'Please run this script with root privileges.'
)
except
AttributeError
:
pass
try
:
if
ctypes
.
windll
.
shell32
.
IsUserAnAdmin
()
!=
1
:
print_error
(
'Please run this script with Administrator privileges.'
)
except
AttributeError
:
print_error
(
'Error checking user access level.'
)
if
FORCE
==
True
:
if
FORCE
==
True
:
print
(
"Forcing regeneration of config and crontab. Note cron times may change."
)
print
(
"Forcing regeneration of config and crontab. Note cron times may change."
)
...
...
storjstatus/version.py
View file @
123c36a7
__version__
=
'0.3.
2
'
__version__
=
'0.3.
3
'
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