corrections matomo

This commit is contained in:
Valentin 2024-05-13 02:13:17 +02:00
parent 65c9d0dfd1
commit 009f6afc08
1 changed files with 2 additions and 2 deletions

View File

@ -26,6 +26,6 @@ sed -i "s/var matomoInstanceUrl = '';/var matomoInstanceUrl = '$matomo_url';/g"
sed -i 's/<\/head>/\n<\/head>/' $index_file sed -i 's/<\/head>/\n<\/head>/' $index_file
line_number=$(grep -n '</head>' $index_file | cut -d':' -f1) line_number=$(grep -n '</head>' $index_file | cut -d':' -f1)
head -n $(($line_number - 1)) $index_file > $tmp_file head -n $(($line_number - 1)) $index_file > $tmp_file
cat $temp_matomo_script >> $tmp_file
tail -n +$line_number $index_file >> $tmp_file tail -n +$line_number $index_file >> $tmp_file
mv $tmp_file $index_file mv $tmp_file $index_file
rm $tmp_file