2018-11-17 22:08:10 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -ev
|
|
|
|
|
|
|
|
# Remove service
|
|
|
|
rm -f /etc/init.d/odoo
|
|
|
|
rc-update -u
|
|
|
|
|
|
|
|
# Drop database and user
|
|
|
|
[ ! -e /run/openrc/started/postgres ] && service postgres start && STOP_POSTGRES=1
|
|
|
|
echo 'DROP DATABASE IF EXISTS odoo; DROP ROLE IF EXISTS odoo;' | lxc-attach -u 5432 -g 5432 postgres -- psql
|
|
|
|
[ ! -z ${STOP_POSTGRES} ] && service postgres stop
|
|
|
|
|
2019-02-26 20:24:02 +01:00
|
|
|
# Unregister application
|
|
|
|
vmmgr unregister-app odoo
|