mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-07 16:06:14 +00:00
handle true/false differently in webapp config (#115)
* true/false should not be put in quotes as its boolean * add a tab before inserting
This commit is contained in:
parent
140506df7d
commit
9a6dbd4a20
@ -15,7 +15,15 @@ php_cfg_gen() {
|
||||
if [ -e "$cfg_file" ]; then
|
||||
if grep -q "$cfg_setting" "$cfg_file"; then
|
||||
echo "Setting $cfg_setting = $cfg_value in $cfg_file"
|
||||
sed -ri "s#(\s*define).+${cfg_setting}.+#\define(\x27${cfg_setting}\x27, \x27${cfg_value}\x27\);#g" "$cfg_file"
|
||||
case $cfg_value in
|
||||
true|TRUE|false|FALSE)
|
||||
echo boolean value
|
||||
sed -ri "s#(\s*define).+${cfg_setting}.+#\tdefine(\x27${cfg_setting}\x27, ${cfg_value}\);#g" "$cfg_file"
|
||||
;;
|
||||
*)
|
||||
sed -ri "s#(\s*define).+${cfg_setting}.+#\tdefine(\x27${cfg_setting}\x27, \x27${cfg_value}\x27\);#g" "$cfg_file"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "Error: Config option $cfg_setting not found in $cfg_file"
|
||||
cat "$cfg_file"
|
||||
|
Loading…
x
Reference in New Issue
Block a user