diff --git a/src/freedombone-utils-web b/src/freedombone-utils-web index 05184c90..98ce2055 100755 --- a/src/freedombone-utils-web +++ b/src/freedombone-utils-web @@ -534,20 +534,27 @@ function install_dynamicdns { mark_completed $FUNCNAME } +function update_default_search_engine { + for d in /home/*/ ; do + USERNAME=$(echo "$d" | awk -F '/' '{print $3}') + if [[ $(is_valid_user "$USERNAME") == "1" ]]; then + if ! grep -q "WWW_HOME" /home/$USERNAME/.bashrc; then + if ! grep -q 'controluser' /home/$USERNAME/.bashrc; then + echo "export WWW_HOME=$DEFAULT_SEARCH" >> /home/$USERNAME/.bashrc + else + sed -i "/controluser/i export WWW_HOME=$DEFAULT_SEARCH" /home/$USERNAME/.bashrc + fi + fi + fi + done +} + function install_command_line_browser { if [[ $(is_completed $FUNCNAME) == "1" ]]; then return fi apt-get -yq install elinks - - # set the home page - if ! grep -q "WWW_HOME" /home/$MY_USERNAME/.bashrc; then - if ! grep -q 'controluser' /home/$MY_USERNAME/.bashrc; then - echo "export WWW_HOME=$DEFAULT_SEARCH" >> /home/$MY_USERNAME/.bashrc - else - sed -i "/controluser/i export WWW_HOME=$DEFAULT_SEARCH" /home/$MY_USERNAME/.bashrc - fi - fi + update_default_search_engine mark_completed $FUNCNAME }