Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
b3a2aac8
Commit
b3a2aac8
authored
Jan 27, 2016
by
neil
Browse files
minor
#check if there is sudo installed, AND if the current user is a sudoer.
parent
f0252b91
Changes
1
Hide whitespace changes
Inline
Side-by-side
le.sh
View file @
b3a2aac8
...
@@ -260,7 +260,14 @@ _stopserver() {
...
@@ -260,7 +260,14 @@ _stopserver() {
}
}
_initpath
()
{
_initpath
()
{
SUDO
=
"
$(
command
-v
sudo
|
grep
-o
'sudo'
)
"
#check if there is sudo installed, AND if the current user is a sudoer.
if
command
-v
sudo
>
/dev/null
;
then
if
[
"
$(
sudo
-n
uptime
2>&1|grep
"load"
|wc
-l
)
"
!=
"0"
]
;
then
SUDO
=
sudo
fi
fi
if
[
-z
"
$API
"
]
;
then
if
[
-z
"
$API
"
]
;
then
if
[
-z
"
$STAGE
"
]
;
then
if
[
-z
"
$STAGE
"
]
;
then
API
=
"
$DEFAULT_CA
"
API
=
"
$DEFAULT_CA
"
...
...
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