Add check for MariaDB status in Ushahidi update-url.sh
This commit is contained in:
parent
70048ad796
commit
1dc2a6951a
@ -5,5 +5,12 @@ HOST="${1}"
|
|||||||
|
|
||||||
sed -i "s|^ \"backend_url\".*| \"backend_url\": \"https://${HOST}/platform\",|" /srv/ushahidi/conf/config.json
|
sed -i "s|^ \"backend_url\".*| \"backend_url\": \"https://${HOST}/platform\",|" /srv/ushahidi/conf/config.json
|
||||||
|
|
||||||
|
if [ ! -e /run/openrc/started/mariadb ]; then
|
||||||
|
service mariadb start
|
||||||
|
STOP_MARIADB=1
|
||||||
|
fi
|
||||||
API_URL='\\\"https:\\\\/\\\\/'${HOST}'\\\\/platform\\\\/api\\\\/v3\\\\/config\\\\/data-provider\\\"'
|
API_URL='\\\"https:\\\\/\\\\/'${HOST}'\\\\/platform\\\\/api\\\\/v3\\\\/config\\\\/data-provider\\\"'
|
||||||
echo 'UPDATE `config` SET `config_value` = "'${API_URL}'" WHERE `group_name` LIKE "data-provider" AND `config_key` LIKE "url";' | docker exec -i mariadb mysql ushahidi
|
echo 'UPDATE `config` SET `config_value` = "'${API_URL}'" WHERE `group_name` LIKE "data-provider" AND `config_key` LIKE "url";' | docker exec -i mariadb mysql ushahidi
|
||||||
|
if [ ${STOP_MARIADB} ]; then
|
||||||
|
service mariadb stop
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user