Fix Vikunja install script to prevent database deletion upon updating (#524)

* Fix issue with Vikunja update wiping DB and files

* use a single sed command

* change build.func to test install script

* another small change in order to test vikunja fix

* another change

* revert URL modification after successful test

* Update vikunja-install.sh

* update vikunja-install.sh
This commit is contained in:
vhsdream 2024-11-26 12:21:22 -05:00 committed by GitHub
parent a4dd7f5449
commit 9795d41d39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,9 @@ cd /opt
RELEASE=$(curl -s https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
wget -q "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb"
$STD dpkg -i vikunja-$RELEASE-amd64.deb
sudo sed -i 's/^ timezone: .*/ timezone: UTC/' /etc/vikunja/config.yml
sed -i 's|^ timezone: .*| timezone: UTC|' /etc/vikunja/config.yml
sed -i 's|"./vikunja.db"|"/etc/vikunja/vikunja.db"|' /etc/vikunja/config.yml
sed -i 's|./files|/etc/vikunja/files|' /etc/vikunja/config.yml
systemctl start vikunja.service
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Vikunja"