- Download it
- Make it Executeable with
chmod +x upgrade_addons.sh
- Use it
./upgrade_addons.sh DATABASE ADDONS_A_TO_UGRADE,ADDONS_B_TO_UPGRADE
#!/bin/bash | |
# Check if both parameters are provided | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo "Usage: $0 <database> <addons>" | |
echo "Please provide both a database name and a comma-separated list of addons (e.g., database_name addons_a,addons_b)." | |
exit 1 | |
fi | |
DATABASE=$1 | |
ADDONS=$2 | |
echo "Upgrading Odoo Module with database: $DATABASE and addons: $ADDONS in 3 seconds..." | |
sleep 3 | |
echo "Upgrading started" | |
/opt/odoo/venv/bin/python /opt/odoo/odoo/odoo-bin --config /etc/odoo.conf --logfile= --no-xmlrpc --stop-after-init -d "$DATABASE" -u "$ADDONS" |