#!/bin/bash export TEXTDOMAIN="zero-lliurex-pmb-installer" MSG_ADVERTISEMENT=$(gettext "You are going to install PMB \\nIt includes mysql, http, php and others, if needs.\\n It will take a long time.\\n Be patient.") MSG_DONE=$(gettext "Done") MSG_TITLE=$(gettext "Advertisement") MSG_AVISO=$(gettext "Your database are going to update.") MSG_NOCONFIGURE=$(gettext "No configuration done") MSG_PMB_DETECTED=$(gettext "A copy of PMB has been detected! Do you want to continue?") zero-center add-pulsating-color zero-lliurex-pmb-installer # Test if a previous pmb is installed on the current systme # if [ -d /usr/share/pmb ]; then if zenity --question --title="$MSG_TITLE" --width=300 --height=100 --text="$MSG_PMB_DETECTED"; then echo "Continua l'instalació..." else zenity --info --text="$MSG_NOCONFIGURE" zero-center remove-pulsating-color zero-lliurex-pmb-installer exit 1 fi fi if zenity --question --title="$MSG_TITLE" --width=300 --height=100 --text="$MSG_ADVERTISEMENT"; then zero-installer install lliurex-pmb else zero-center remove-pulsating-color zero-lliurex-pmb-installer exit 1 fi # Testing it MySQL is alive and the root passwd is available # "sudo" is mandatory here, I don't understand the correct reason... # if you are reading this comment, and know the answer...please contact with us # sudo mysql_root_passwd -i # Since the 0.61 version, which is required by lliurex-pmb the lliurex-sgbd utility uses # a simple mechanism to create a token in /tmp/db_is_present , a more useful mechanism that "NO" # at STDOUT. lliurex-sgbd --db_is_present lliurex-pmb if [ ! -f /tmp/db_is_present ]; then lliurex-pmb --install-database else zenity --info --text="$MSG_AVISO" lliurex-pmb --upgrade fi lliurex-pmb --hosts zero-center remove-pulsating-color zero-lliurex-pmb-installer zero-center set-configured zero-lliurex-pmb-installer exit 0