vikunja/build/after-install.sh
kolaente bc782e68ff
All checks were successful
continuous-integration/drone/push Build is passing
Add systemd service file to linux packages
2021-03-28 18:18:58 +02:00

10 lines
393 B
Bash

#!/bin/bash
systemctl enable vikunja.service
# Fix the config to contain proper values
NEW_SECRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
sed -i "s/<jwt-secret>/$NEW_SECRET/g" /etc/vikunja/config.yml
sed -i "s/<rootpath>/\/opt\/vikunja\//g" /etc/vikunja/config.yml
sed -i "s/Path: \"\.\/vikunja.db\"/Path: \"\\/opt\/vikunja\/vikunja.db\"/g" /etc/vikunja/config.yml