Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
novelai-storage
Stable Diffusion Webui
Commits
88a01f94
Commit
88a01f94
authored
Nov 27, 2022
by
AUTOMATIC1111
Committed by
GitHub
Nov 27, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1904 from EternalNooblet/dev
Added a flag to run as root if needed
parents
eb085501
06536444
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
webui.sh
webui.sh
+13
-1
No files found.
webui.sh
View file @
88a01f94
...
...
@@ -3,6 +3,7 @@
# Please do not make any changes to this file, #
# change the variables in webui-user.sh instead #
#################################################
# Read variables from webui-user.sh
# shellcheck source=/dev/null
if
[[
-f
webui-user.sh
]]
...
...
@@ -46,6 +47,17 @@ then
LAUNCH_SCRIPT
=
"launch.py"
fi
# this script cannot be run as root by default
can_run_as_root
=
0
# read any command line flags to the webui.sh script
while
getopts
"f"
flag
do
case
${
flag
}
in
f
)
can_run_as_root
=
1
;;
esac
done
# Disable sentry logging
export
ERROR_REPORTING
=
FALSE
...
...
@@ -61,7 +73,7 @@ printf "\e[1m\e[34mTested on Debian 11 (Bullseye)\e[0m"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
# Do not run as root
if
[[
$(
id
-u
)
-eq
0
]]
if
[[
$(
id
-u
)
-eq
0
&&
can_run_as_root
-eq
0
]]
then
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"
\e
[1m
\e
[31mERROR: This script must not be launched as root, aborting...
\e
[0m"
...
...
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