This commit is contained in:
Bob Mottram 2015-10-31 23:18:35 +00:00
parent eab55eaf38
commit 858947b462
1 changed files with 2 additions and 2 deletions

View File

@ -36,8 +36,8 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then
if [ -d /etc/nginx ]; then if [ -d /etc/nginx ]; then
for filename in /etc/nginx/sites-available/* ; do for filename in /etc/nginx/sites-available/* ; do
filename_domain=$(echo "$filename" | awk -F '/' '{print $5}') filename_domain=$(echo "$filename" | awk -F '/' '{print $5}')
sed -i 's|access_log.*|access_log /var/log/nginx/$filename_domain.access.log;|g' $filename sed -i "s|access_log.*|access_log /var/log/nginx/$filename_domain.access.log;|g" $filename
sed -i 's|warn_log.*|warn_log /var/log/nginx/$filename_domain.warn.log;|g' $filename sed -i "s|warn_log.*|warn_log /var/log/nginx/$filename_domain.warn.log;|g" $filename
sed -i "s|error_log.*|error_log /var/log/nginx/$filename_domain.err.log;|g" $filename sed -i "s|error_log.*|error_log /var/log/nginx/$filename_domain.err.log;|g" $filename
done done
fi fi