Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eda284d

Browse files
committed
corrected su - username code
1 parent ce832d9 commit eda284d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎installation_scripts/install_flask_nginx.sh‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ create_user() {
5050
echo -e "<html>\n<head>\n\t<title>NGINX - TEST</title>\n</head>\n<body>\n\t<h3>THIS IS A TEST<h3>\n\t<h4>Index file loaded from /home/$username/public_html/<h4>\n</body>\n</html>" >> /home/$username/public_html/index.html
5151

5252
chown -Rv $username:$username /home/$username
53+
usermod -aG wheel $username
5354
}
5455

5556
create_vhost() {
@@ -128,14 +129,18 @@ install_python3() {
128129
}
129130

130131
install_flask_gunicorn() {
131-
su - $username; cd public_html
132+
su $username <<'EOF'
133+
cd public_html
132134
python3 -m venv flask_demoenv
133135
source flask_demoenv/bin/activate
136+
python3 -m pip install -r requirements.txt
137+
deactivate; logout
134138
139+
EOF
135140
# Download from VCS
141+
echo -e "PENDING: Download project from Git"
142+
exit
136143

137-
python3 -m pip install -r requirements.txt
138-
deactivate; logout
139144
}
140145

141146
configure_gunicorn(){

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /