Add systemd service file to linux packages
This commit is contained in:
parent
6c3488b8aa
commit
bc782e68ff
3 changed files with 30 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
systemctl enable vikunja.service
|
||||||
|
|
||||||
# Fix the config to contain proper values
|
# Fix the config to contain proper values
|
||||||
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
|
||||||
|
|
|
@ -8,6 +8,8 @@ homepage: "https://vikunja.io"
|
||||||
section: "default"
|
section: "default"
|
||||||
priority: "extra"
|
priority: "extra"
|
||||||
license: "AGPLv3"
|
license: "AGPLv3"
|
||||||
|
depends:
|
||||||
|
- systemd
|
||||||
contents:
|
contents:
|
||||||
- src: <binlocation>
|
- src: <binlocation>
|
||||||
dst: /opt/vikunja/vikunja
|
dst: /opt/vikunja/vikunja
|
||||||
|
@ -17,5 +19,7 @@ contents:
|
||||||
- src: /opt/vikunja/vikunja
|
- src: /opt/vikunja/vikunja
|
||||||
dst: /usr/local/bin/vikunja
|
dst: /usr/local/bin/vikunja
|
||||||
type: "symlink"
|
type: "symlink"
|
||||||
|
- src: vikunja.service
|
||||||
|
dst: /usr/lib/systemd/system/vikunja.service
|
||||||
scripts:
|
scripts:
|
||||||
postinstall: ./build/after-install.sh
|
postinstall: ./build/after-install.sh
|
||||||
|
|
24
vikunja.service
Normal file
24
vikunja.service
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Vikunja
|
||||||
|
After=syslog.target
|
||||||
|
After=network.target
|
||||||
|
# Depending on how you configured Vikunja, you may want to uncomment these:
|
||||||
|
#Requires=mysql.service
|
||||||
|
#Requires=mariadb.service
|
||||||
|
#Requires=postgresql.service
|
||||||
|
#Requires=redis.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
RestartSec=2s
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/opt/vikunja
|
||||||
|
ExecStart=/usr/local/bin/vikunja
|
||||||
|
Restart=always
|
||||||
|
# If you want to bind Vikunja to a port below 1024 uncomment
|
||||||
|
# the two values below
|
||||||
|
###
|
||||||
|
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||||
|
#AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue