uninstall script
is there any script to undo all the changes made by this script ?
That would be brilliant. A real time saver. For those who want to fast uninstall, and test run a new versions of the script. Without having to reinstall the OS, which takes a longer time.
No there isn't at the moment. Since you're not the first one to ask this I believe we should create one. @chris001 I'd love your feedback here. A new script next to the install script where you provide the parameters and it deletes everything?
@Yenthe666
For better maintainability, I vote for the same script, with the --uninstall command line parameter.
It should be simple to get done, every command has its inverse/opposite!
Interesting and usable idea.
Remember also the "multi-Odoo" case in uninstaller. Does it make it too complex at this point?
Another alternative, that the "uninstall" simply uninstalls all instances of Odoo on that host. As long as user knows his stuff, I guess it's ok.
@jpaulin
- I've implemented
--uninstallin the script.
- The way it works right now is, it will uninstall the one
/home/odoodirectory (default name), and delete the oneodoouser (default name), these defaults come from the fixed parameters. - I'll add a command line parameter to allow for uninstall ALL odoo on a multi-odoo case.
- I've implemented
--delete-start-over
- This uninstalls the one
/home/odoodirectory and userodoo, and creates a new userodoo(the username is in the fixed parameters). This is great for when you want to run the installer on an empty server, as non-rootuser,odoo. - This will also get updated to accept all command-line parameters for username, etc., and handle the mutl-
odoocase.
@chris001 Thanks :) Will check it. Don't you guys think this issue should be closed as uninstall has been implemented?
@bishisht nope, as it is only just a PR at this point and it hasn't been merged in with my 'official' branches. So, this is still relevant.
@Yenthe666 I think you should merge this asap. :) Its good feature. :)
@bishisht we're working on it. It asks quite some time from @chris001 to fix/change and add features and quite some time for me to double check and give feedback too. Give us some time, it'll be worth it 😉
yes i vote to add this feautre too
@Yenthe666 is the feature added?
Hi - no haven't gotten around to it (yet).
Hi all, I have also been facing the same issue with uninstalling from an ubuntu 16.04 deployment. I would also vote for the addition of this feature if possible in the main install script (like a roll back feature) so one would not have to worry too much about multi installations being affected. any thoughts?
Over the last few days I installed community edition first - worked OK. Then ran script again to try Enterprise Ed. - it Failed no idea why - been trying (with no success ever since to get either of them working but for some reason I cannot remove and re-install it all looks OK doesn't show any error but the service isn't running..
I could really use a proper uninstall at this point
Here is it >>
Stop service
sudo service odoo-server stop sudo pkill -u odoo
Remove config file(s)
sudo rm -f /etc/odoo-server.conf sudo rm -f /etc/odoo.conf
Remove application code
sudo rm -R /odoo
Remove startup process
sudo update-rc.d -f odoo-server remove sudo rm -f /etc/init.d/odoo-server
Remove logs
sudo rm -R /var/log/odoo
Remove databases
sudo service postgresql stop sudo apt-get remove postgresql -y sudo apt-get --purge remove postgresql* -y sudo rm -r -f /etc/postgresql/ sudo rm -r -f /etc/postgresql-common/ sudo rm -r -f /var/lib/postgresql/
Delete users and groups
sudo userdel -r postgres sudo groupdel postgres sudo userdel -r odoo sudo groupdel odoo
Thanks!
On Wed, 17 Jun 2020 at 03:16, mohamed fouad [email protected] wrote:
Here is it >> Stop service
sudo service odoo-server stop sudo pkill -u odoo Remove config file(s)
sudo rm -f /etc/odoo-server.conf sudo rm -f /etc/odoo.conf Remove application code
sudo rm -R /odoo Remove startup process
sudo update-rc.d -f odoo-server remove sudo rm -f /etc/init.d/odoo-server Remove logs
sudo rm -R /var/log/odoo Remove databases
sudo service postgresql stop sudo apt-get remove postgresql -y sudo apt-get --purge remove postgresql* -y sudo rm -r -f /etc/postgresql/ sudo rm -r -f /etc/postgresql-common/ sudo rm -r -f /var/lib/postgresql/ Delete users and groups
sudo userdel -r postgres sudo groupdel postgres sudo userdel -r odoo sudo groupdel odoo
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Yenthe666/InstallScript/issues/67#issuecomment-645090111, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANN4XY3G7EUTNO2QKVCFOH3RXAKNTANCNFSM4EBVHLMQ .
Hello EveryOne I have problem after installation of odoo using scripts my postgresl is now activate(exited)
Please I need your helper

Try a restart. Don't hijack other issues that are unrelated though, start a new issue with details.
I try many times but there still the same issues Sir last time was working well.
Again, create a ticket with clear steps/info/logs. Don't spam an unrelated thread with this.
Yes I create it Sir
On Thu, Oct 15, 2020 at 3:12 PM Yenthe Van Ginneken < [email protected]> wrote:
Again, create a ticket with clear steps/info/logs. Don't spam an unrelated thread with this.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Yenthe666/InstallScript/issues/67#issuecomment-709315174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWGPC7IQ2T5XKL4FEAHBCLSK3YMRANCNFSM4EBVHLMQ .
Hey guys I was inspired by mfhm95 to make this. Takes all the steps and runs them in a bash script. https://github.com/tunahorse/Odoo_UninstallScript
Stuff like sudo apt-get remove postgresql -y is really dangerous though :) What if there is something else running on PSQL?
Stuff like
sudo apt-get remove postgresql -yis really dangerous though :) What if there is something else running on PSQL?
Good point. I updated the script to ask the user, if they just want to nuke PSQL or remove a specific db.
Step 6: Remove databases
green "Would you like to remove PostgreSQL completely or just a specific database? [COMPLETE/DB_NAME]: "
read -r db_choice
if [[ $db_choice == "COMPLETE" ]]; then
green "Removing PostgreSQL..."
sudo service postgresql stop
sudo apt-get remove postgresql -y
sudo apt-get --purge remove postgresql* -y
sudo rm -r -f /etc/postgresql/
sudo rm -r -f /etc/postgresql-common/
sudo rm -r -f /var/lib/postgresql/
else
green "Removing the database $db_choice..."
sudo su - postgres -c "psql -c \"SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = '$db_choice' AND pid <> pg_backend_pid();\""
sudo su - postgres -c "psql -c \"DROP DATABASE $db_choice;\""
fi