Revert "Update uninstall script not to fail on clean installation"
This reverts commit a339c8e8ff8b0fdcde1d3367afd26ea980b1149e.
This commit is contained in:
parent
237342254f
commit
61fab326c3
@ -10,24 +10,18 @@ rm -f /etc/init.d/ckan
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE ckan; DROP DATABASE ckan_datastore; DROP ROLE ckan; DROP ROLE ckan_datastore;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE ckan; DROP DATABASE ckan_datastore; DROP ROLE ckan; DROP ROLE ckan_datastore;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove redis data
|
# Remove redis data
|
||||||
if [ -e /etc/init.d/redis ]; then
|
[ ! -e /run/openrc/started/redis ] && service redis start && STOP_REDIS=1
|
||||||
[ ! -e /run/openrc/started/redis ] && service redis start && STOP_REDIS=1
|
lxc-attach redis -- redis-cli -n 0 flushdb
|
||||||
lxc-attach redis -- redis-cli -n 0 flushdb
|
[ ! -z ${STOP_REDIS} ] && service redis stop
|
||||||
[ ! -z ${STOP_REDIS} ] && service redis stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove solr core
|
# Remove solr core
|
||||||
if [ -e /etc/init.d/solr ]; then
|
[ -e /run/openrc/started/solr ] && service solr stop && START_SOLR=1
|
||||||
[ -e /run/openrc/started/solr ] && service solr stop && START_SOLR=1
|
rm -rf /srv/solr/data/ckan
|
||||||
rm -rf /srv/solr/data/ckan
|
[ ! -z ${START_SOLR} ] && service solr start
|
||||||
[ ! -z ${START_SOLR} ] && service solr start
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/crisiscleanup
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE crisiscleanup; DROP ROLE crisiscleanup;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE crisiscleanup; DROP ROLE crisiscleanup;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/cts
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE cts; DROP ROLE cts;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE cts; DROP ROLE cts;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/gnuhealth
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE gnuhealth; DROP DATABASE gnuhealth_demo; DROP ROLE gnuhealth;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE gnuhealth; DROP DATABASE gnuhealth_demo; DROP ROLE gnuhealth;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -10,10 +10,8 @@ rm -f /etc/init.d/kanboard
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE kanboard; DROP ROLE kanboard;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE kanboard; DROP ROLE kanboard;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/mifosx
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/mariadb ]; then
|
[ ! -e /run/openrc/started/mariadb ] && service mariadb start && STOP_MARIADB=1
|
||||||
[ ! -e /run/openrc/started/mariadb ] && service mariadb start && STOP_MARIADB=1
|
echo 'DROP DATABASE `mifosplatform-tenants`; DROP DATABASE `mifostenant-default`; DROP USER `mifosx`;' | lxc-attach mariadb -- mysql
|
||||||
echo 'DROP DATABASE `mifosplatform-tenants`; DROP DATABASE `mifostenant-default`; DROP USER `mifosx`;' | lxc-attach mariadb -- mysql
|
[ ! -z ${STOP_MARIADB} ] && service mariadb stop
|
||||||
[ ! -z ${STOP_MARIADB} ] && service mariadb stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,11 +7,9 @@ rm -f /etc/init.d/motech
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE motech; DROP DATABASE motechdata; DROP DATABASE motechquartz; DROP DATABASE motechschema; DROP ROLE motech;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE motech; DROP DATABASE motechdata; DROP DATABASE motechquartz; DROP DATABASE motechschema; DROP ROLE motech;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TODO: Clear ActiveMQ config
|
# TODO: Clear ActiveMQ config
|
||||||
|
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/opendatakit-build
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE opendatakitbuild; DROP ROLE opendatakitbuild;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE opendatakitbuild; DROP ROLE opendatakitbuild;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/opendatakit
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE opendatakit; DROP ROLE opendatakit;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE opendatakit; DROP ROLE opendatakit;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/openmapkit
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE openmapkit; DROP ROLE openmapkit;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE openmapkit; DROP ROLE openmapkit;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,18 +7,14 @@ rm -f /etc/init.d/pandora
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE pandora; DROP ROLE pandora;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE pandora; DROP ROLE pandora;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove RabbitMQ vhost and user
|
# Remove RabbitMQ vhost and user
|
||||||
if [ -e /etc/init.d/rabbitmq ]; then
|
[ ! -e /run/openrc/started/rabbitmq ] && service rabbitmq start && STOP_RABBITMQ=1
|
||||||
[ ! -e /run/openrc/started/rabbitmq ] && service rabbitmq start && STOP_RABBITMQ=1
|
lxc-attach rabbitmq -- rabbitmqctl delete_vhost /pandora || true
|
||||||
lxc-attach rabbitmq -- rabbitmqctl delete_vhost /pandora || true
|
lxc-attach rabbitmq -- rabbitmqctl delete_user pandora || true
|
||||||
lxc-attach rabbitmq -- rabbitmqctl delete_user pandora || true
|
[ ! -z ${STOP_RABBITMQ} ] && service rabbitmq stop
|
||||||
[ ! -z ${STOP_RABBITMQ} ] && service rabbitmq stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/sahana-demo
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE sahanademo; DROP ROLE sahanademo;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE sahanademo; DROP ROLE sahanademo;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/sahana
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE sahana; DROP ROLE sahana;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE sahana; DROP ROLE sahana;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/sambro
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE sambro; DROP ROLE sambro;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE sambro; DROP ROLE sambro;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -10,10 +10,8 @@ rm -f /etc/init.d/seeddms
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE seeddms; DROP ROLE seeddms;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE seeddms; DROP ROLE seeddms;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -7,10 +7,8 @@ rm -f /etc/init.d/sigmah
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/postgres ]; then
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
||||||
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
echo 'DROP DATABASE sigmah; DROP ROLE sigmah;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
||||||
echo 'DROP DATABASE sigmah; DROP ROLE sigmah;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
||||||
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -10,10 +10,8 @@ rm -f /etc/init.d/ushahidi
|
|||||||
rc-update -u
|
rc-update -u
|
||||||
|
|
||||||
# Drop database and user
|
# Drop database and user
|
||||||
if [ -e /etc/init.d/mariadb ]; then
|
[ ! -e /run/openrc/started/mariadb ] && service mariadb start && STOP_MARIADB=1
|
||||||
[ ! -e /run/openrc/started/mariadb ] && service mariadb start && STOP_MARIADB=1
|
echo 'DROP DATABASE ushahidi; DROP USER ushahidi;' | lxc-attach mariadb -- mysql
|
||||||
echo 'DROP DATABASE ushahidi; DROP USER ushahidi;' | lxc-attach mariadb -- mysql
|
[ ! -z ${STOP_MARIADB} ] && service mariadb stop
|
||||||
[ ! -z ${STOP_MARIADB} ] && service mariadb stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user