X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpost-install;h=383ab6e334f740f6116214cf0367b3a30e6011cc;hb=4e78d26dd7f5e46a21cdc916e031f1b4a68578c0;hp=f9dbdb376690022ce9815d1e48b8e82c2dc765f8;hpb=f3c8db3027d5dc530e1f30c88e0235975211582e;p=hvlinux.git diff --git a/stage5/post-install b/stage5/post-install index f9dbdb3..383ab6e 100755 --- a/stage5/post-install +++ b/stage5/post-install @@ -2,93 +2,62 @@ source ../functions/main +update-desktop-database + +if [ -n "${REGUSER}" ]; then + hv_useradd -g users -s /bin/bash -m ${REGUSER} + + # Add user to these supplementary groups: + usermod -a -G \ + audio,dialout,video,cdrom,usb,shutdown,kvm,lp,lpadmin,scanner,plugdev \ + ${REGUSER} +fi + if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then - + ######################################### - # MySQL + # Apache ######################################### - READ_VALID="no" - - while [ "${READ_VALID}" = "no" ]; do - echo "Do you want to set MySQL root password? (y/n): " - read SET_MYSQL_ROOT_PASS - - if [ "${SET_MYSQL_ROOT_PASS}" = "y" -o "${SET_MYSQL_ROOT_PASS}" = "n" ]; then - READ_VALID="yes" - else - echo "Error, answer y or n" - fi - done - - if [ "${SET_MYSQL_ROOT_PASS}" = "y" ]; then - # Further configuration requires that the MySQL server be running: - mysqld_safe --user=mysql 2>&1 >/dev/null & - - PASS_MATCH="no" - - while [ "${PASS_MATCH}" = "no" ]; do - echo -n "Enter new MySQL root password: " >&2 - read PASS1 - echo -n "Re-enter password to confirm : " >&2 - read PASS2 - - if [ "${PASS1}" != "${PASS2}" ]; then - echo "Error, passwords don't match" + if [ "x${USE_HTTPD}" = "xyes" ]; then + READ_VALID="no" + + while [ "${READ_VALID}" = "no" ]; do + echo "Do you want to generate SSL self-signed" + echo -n "certificate for Apache? (y/n): " + read USE_SSL + + if [ "${USE_SSL}" = "y" -o "${USE_SSL}" = "n" ]; then + READ_VALID="yes" else - PASS_MATCH="yes" + echo "Error, answer y or n" fi - done - - mysqladmin -u root password ${PASS1} - echo "MySQL root password set." - - echo "Shutting down MySQL server:" - # Configuration of the server is now finished. Shuting down the server. - mysqladmin -p shutdown - fi + done - ######################################### - # Apache - ######################################### - READ_VALID="no" - - while [ "${READ_VALID}" = "no" ]; do - echo "Do you want to generate SSL self-signed" - echo -n "certificate for Apache? (y/n): " - read USE_SSL - - if [ "${USE_SSL}" = "y" -o "${USE_SSL}" = "n" ]; then - READ_VALID="yes" - else - echo "Error, answer y or n" - fi - done - - if [ "${USE_SSL}" = "y" ]; then - /etc/apache/generate-ssl-certs + if [ "${USE_SSL}" = "y" ]; then + /etc/httpd/generate-ssl-certs + fi fi - + ######################################### # imap ######################################### READ_VALID="no" - + while [ "${READ_VALID}" = "no" ]; do echo "Do you want to generate SSL self-signed" echo -n "certificate for IMAP server? (y/n): " read USE_SSL - + if [ "${USE_SSL}" = "y" -o "${USE_SSL}" = "n" ]; then READ_VALID="yes" else echo "Error, answer y or n" fi done - + if [ "${USE_SSL}" = "y" ]; then /etc/mail/imap-ssl-certs fi - fi exit $?