Skip to content

Commit 9795d41

Browse files
authored
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
1 parent a4dd7f5 commit 9795d41

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install/vikunja-install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ cd /opt
2626
RELEASE=$(curl -s https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
2727
wget -q "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb"
2828
$STD dpkg -i vikunja-$RELEASE-amd64.deb
29-
sudo sed -i 's/^ timezone: .*/ timezone: UTC/' /etc/vikunja/config.yml
29+
sed -i 's|^ timezone: .*| timezone: UTC|' /etc/vikunja/config.yml
30+
sed -i 's|"./vikunja.db"|"/etc/vikunja/vikunja.db"|' /etc/vikunja/config.yml
31+
sed -i 's|./files|/etc/vikunja/files|' /etc/vikunja/config.yml
3032
systemctl start vikunja.service
3133
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
3234
msg_ok "Installed Vikunja"

0 commit comments

Comments
 (0)