mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-02-01 22:47:40 +00:00
fix(release): use openrc for alpine (#1016)
This commit is contained in:
8
build/after-install-openrc.sh
Executable file
8
build/after-install-openrc.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
rc-update add vikunja default
|
||||||
|
|
||||||
|
# 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
|
||||||
@@ -6,4 +6,4 @@ systemctl enable vikunja.service
|
|||||||
NEW_SECRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
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/<jwt-secret>/$NEW_SECRET/g" /etc/vikunja/config.yml
|
||||||
sed -i "s/<rootpath>/\/opt\/vikunja\//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
|
sed -i "s/path: \"\.\/vikunja.db\"/path: \"\\/opt\/vikunja\/vikunja.db\"/g" /etc/vikunja/config.yml
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ in {
|
|||||||
git-cliff
|
git-cliff
|
||||||
actionlint
|
actionlint
|
||||||
crowdin-cli
|
crowdin-cli
|
||||||
|
nfpm
|
||||||
# API tools
|
# API tools
|
||||||
golangci-lint mage
|
golangci-lint mage
|
||||||
# Desktop
|
# Desktop
|
||||||
|
|||||||
10
nfpm.yaml
10
nfpm.yaml
@@ -10,6 +10,12 @@ priority: "extra"
|
|||||||
license: "AGPLv3"
|
license: "AGPLv3"
|
||||||
depends:
|
depends:
|
||||||
- systemd
|
- systemd
|
||||||
|
overrides:
|
||||||
|
apk:
|
||||||
|
depends:
|
||||||
|
- openrc
|
||||||
|
scripts:
|
||||||
|
postinstall: ./build/after-install-openrc.sh
|
||||||
contents:
|
contents:
|
||||||
- src: <binlocation>
|
- src: <binlocation>
|
||||||
dst: /opt/vikunja/vikunja
|
dst: /opt/vikunja/vikunja
|
||||||
@@ -21,5 +27,9 @@ contents:
|
|||||||
type: "symlink"
|
type: "symlink"
|
||||||
- src: vikunja.service
|
- src: vikunja.service
|
||||||
dst: /usr/lib/systemd/system/vikunja.service
|
dst: /usr/lib/systemd/system/vikunja.service
|
||||||
|
- src: vikunja.initd
|
||||||
|
dst: /etc/init.d/vikunja
|
||||||
|
type: "config"
|
||||||
|
packager: apk
|
||||||
scripts:
|
scripts:
|
||||||
postinstall: ./build/after-install.sh
|
postinstall: ./build/after-install.sh
|
||||||
|
|||||||
15
vikunja.initd
Executable file
15
vikunja.initd
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
command="/usr/local/bin/vikunja"
|
||||||
|
command_background=true
|
||||||
|
pidfile="/run/vikunja.pid"
|
||||||
|
directory="/opt/vikunja"
|
||||||
|
description="Vikunja service"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath --directory /run
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user