mirror of
https://github.com/myvesta/vesta
synced 2025-07-05 20:41:53 -07:00
Create fix_ssl_directive_in_templates.sh
This commit is contained in:
parent
ab9b778e39
commit
514bf9e0f1
1 changed files with 21 additions and 0 deletions
21
upd/fix_ssl_directive_in_templates.sh
Normal file
21
upd/fix_ssl_directive_in_templates.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
release=$(cat /etc/debian_version | tr "." "\n" | head -n1)
|
||||
|
||||
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"
|
||||
sed -i "s|:%proxy_ssl_port%;|:%proxy_ssl_port% ssl http2;|g" $FILE
|
||||
sed -i "s|ssl *on;|#ssl on;|g" $FILE
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
for user in $(grep '@' /etc/passwd |cut -f1 -d:); do
|
||||
if [ ! -f "/usr/local/vesta/data/users/$user/user.conf" ]; then
|
||||
continue;
|
||||
fi
|
||||
v-rebuild-web-domains $user 'no'
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue