mirror of
https://github.com/go-vikunja/vikunja.git
synced 2025-12-05 19:16:51 -06: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)
|
||||
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
|
||||
sed -i "s/path: \"\.\/vikunja.db\"/path: \"\\/opt\/vikunja\/vikunja.db\"/g" /etc/vikunja/config.yml
|
||||
|
||||
@@ -12,6 +12,7 @@ in {
|
||||
git-cliff
|
||||
actionlint
|
||||
crowdin-cli
|
||||
nfpm
|
||||
# API tools
|
||||
golangci-lint mage
|
||||
# Desktop
|
||||
|
||||
10
nfpm.yaml
10
nfpm.yaml
@@ -10,6 +10,12 @@ priority: "extra"
|
||||
license: "AGPLv3"
|
||||
depends:
|
||||
- systemd
|
||||
overrides:
|
||||
apk:
|
||||
depends:
|
||||
- openrc
|
||||
scripts:
|
||||
postinstall: ./build/after-install-openrc.sh
|
||||
contents:
|
||||
- src: <binlocation>
|
||||
dst: /opt/vikunja/vikunja
|
||||
@@ -21,5 +27,9 @@ contents:
|
||||
type: "symlink"
|
||||
- src: vikunja.service
|
||||
dst: /usr/lib/systemd/system/vikunja.service
|
||||
- src: vikunja.initd
|
||||
dst: /etc/init.d/vikunja
|
||||
type: "config"
|
||||
packager: apk
|
||||
scripts:
|
||||
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