diff --git a/scripts/upgrade b/scripts/upgrade index 5efb06ad0562923e8d224450368dbe8327afc993..c5ae14c002287c50b8d536a87a0816ebdd4713c5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,12 +15,28 @@ fi # 0.2 -> 0.2.1 if [[ "$version" == "0.2" ]]; then - - get_out_of_testing - sudo yunohost app setting neutrinet version -v "0.2.1" version="0.2.1" - cd /opt/neutrinet/renew_cert + cd $RENEW_CERT_PATH sudo ve/bin/python renew_from_cube.py fi + +# 0.2.1 -> 0.2.2 +if [[ "$version" == "0.2.1" ]]; then + sudo yunohost app setting neutrinet version -v "0.2.2" + version="0.2.2" + + cd $RENEW_CERT_PATH + sudo git fetch + sudo git checkout 01b9306e51e74a2dac5b06f3fb6c29a0fb2fe755 + sudo ve/bin/python renew_from_cube.py --cron + + cat < /etc/cron.daily/neutrinet-renew-cert +#!/bin/bash +cd $RENEW_CERT_PATH +ve/bin/python renew_from_cube.py --cron +EOF + sudo chown root:root /etc/cron.daily/neutrinet-renew-cert + sudo chmod 0755 /etc/cron.daily/neutrinet-renew-cert +fi