delete eval from roundcube configs

This commit is contained in:
Serghey Rodin 2018-05-11 16:44:45 +03:00
parent 4e81382cd8
commit 19400663ec

19
upd/fix_roundcube.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
# Locate roundcube directory
if [ -d '/etc/roundcube' ]; then
rc_dir='/etc/roundcube'
fi
if [ -d '/etc/roundcubemail' ]; then
rc_dir='/etc/roundcubemail'
fi
if [ -z "$rc_dir" ]; then
exit
fi
# Check for eval
cd $rc_dir
for config in $(grep eval *.php |cut -f1 -d:); do
sed -i '/eval/d' $config
done