postinstall.sh fixes
This commit is contained in:
parent
4f8b243034
commit
6aaaaca211
1 changed files with 8 additions and 8 deletions
|
@ -98,14 +98,14 @@ else
|
||||||
echo "# Creating zammad mysql user"
|
echo "# Creating zammad mysql user"
|
||||||
mysql ${MYSQL_CREDENTIALS} -e "CREATE USER \"${DB_USER}\"@\"${DB_HOST}\" IDENTIFIED BY \"${DB_PASS}\";"
|
mysql ${MYSQL_CREDENTIALS} -e "CREATE USER \"${DB_USER}\"@\"${DB_HOST}\" IDENTIFIED BY \"${DB_PASS}\";"
|
||||||
|
|
||||||
echo "# Grant privileges to new mysql user"
|
echo "# Grant privileges to new mysql user"
|
||||||
mysql ${MYSQL_CREDENTIALS} -e "GRANT ALL PRIVILEGES ON ${DB}.* TO \"${DB_USER}\"@\"${DB_HOST}\"; FLUSH PRIVILEGES;"
|
mysql ${MYSQL_CREDENTIALS} -e "GRANT ALL PRIVILEGES ON ${DB}.* TO \"${DB_USER}\"@\"${DB_HOST}\"; FLUSH PRIVILEGES;"
|
||||||
|
|
||||||
echo "# Updating database.yml"
|
echo "# Updating database.yml"
|
||||||
sed -e "s/.*adapter:.*/ adapter: mysql2/" \
|
sed -e "s/.*adapter:.*/ adapter: mysql2/" \
|
||||||
-e "s/.*username:.*/ username: ${DB_USER}/" \
|
-e "s/.*username:.*/ username: ${DB_USER}/" \
|
||||||
-e "s/.*password:.*/ password: ${DB_PASS}/" \
|
-e "s/.*password:.*/ password: ${DB_PASS}/" \
|
||||||
-e "s/.*database:.*/ database: ${DB}/" < ${ZAMMAD_DIR}/config/database.yml.dist > ${ZAMMAD_DIR}/config/database.yml
|
-e "s/.*database:.*/ database: ${DB}/" < ${ZAMMAD_DIR}/config/database.yml.dist > ${ZAMMAD_DIR}/config/database.yml
|
||||||
|
|
||||||
# sqlite / no local db
|
# sqlite / no local db
|
||||||
elif [ -n "$(which sqlite 2> /dev/null)" ];then
|
elif [ -n "$(which sqlite 2> /dev/null)" ];then
|
||||||
|
@ -175,12 +175,12 @@ if [ -n "$(which apache2 2> /dev/null)" ] || [ -n "$(which httpd 2> /dev/null)"
|
||||||
test -f ${WEBSERVER_CONF} || cp ${ZAMMAD_DIR}/contrib/apache2/zammad.conf ${WEBSERVER_CONF}
|
test -f ${WEBSERVER_CONF} || cp ${ZAMMAD_DIR}/contrib/apache2/zammad.conf ${WEBSERVER_CONF}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "# Restarting webserver ${WEBSERVER_CMD}"
|
|
||||||
${INIT_CMD} restart ${WEBSERVER_CMD}
|
|
||||||
|
|
||||||
echo "# Creating webserver bootstart"
|
echo "# Creating webserver bootstart"
|
||||||
${INIT_CMD} enable ${WEBSERVER_CMD}
|
${INIT_CMD} enable ${WEBSERVER_CMD}
|
||||||
|
|
||||||
|
echo "# Restarting webserver ${WEBSERVER_CMD}"
|
||||||
|
${INIT_CMD} restart ${WEBSERVER_CMD}
|
||||||
|
|
||||||
echo -e "####################################################################################"
|
echo -e "####################################################################################"
|
||||||
echo -e "\nAdd your FQDN to servername directive in ${WEBSERVER_CONF}"
|
echo -e "\nAdd your FQDN to servername directive in ${WEBSERVER_CONF}"
|
||||||
echo -e "and restart your webserver if you're not testing localy"
|
echo -e "and restart your webserver if you're not testing localy"
|
||||||
|
|
Loading…
Reference in a new issue