mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
Update fix_ssl_directive_in_templates.sh
This commit is contained in:
parent
9cdfaf483f
commit
9230e004f1
1 changed files with 6 additions and 2 deletions
|
@ -6,9 +6,13 @@ if [ "$release" -eq 9 ] || [ "$release" -eq 10 ]; then
|
|||
for FILE in /usr/local/vesta/data/templates/web/nginx/*.stpl; do
|
||||
check_grep=$(grep -c 'http2' $FILE)
|
||||
if [ "$check_grep" -eq 0 ]; then
|
||||
echo "=== Fixing ssl directive in $FILE"
|
||||
echo "=== Fixing http2 directive in $FILE"
|
||||
sed -i "s|:%proxy_ssl_port%;|:%proxy_ssl_port% ssl http2;|g" $FILE
|
||||
sed -i "s|ssl *on;|#ssl on;|g" $FILE
|
||||
fi
|
||||
check_grep=$(grep -c 'ssl *on;' $FILE)
|
||||
if [ "$check_grep" -gt 0 ]; then
|
||||
echo "=== Fixing ssl directive in $FILE"
|
||||
sed -i "s|ssl *on;|#ssl_on;|g" $FILE
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue