Artix Linux Forum

Init systems => dinit => Topic started by: Arch_user on 22 October 2022, 16:20:26

Title: [Help] dinit service for netbird
Post by: Arch_user on 22 October 2022, 16:20:26
I am trying to make service for netbird (https://aur.archlinux.org/packages/netbird-bin) , but service is terminated with
Code: [Select]
exit status: 2

/etc/dinit.d/netbird
Code: [Select]
type = process
command = /etc/dinit.d/scripts/netbird
/etc/dinit.d/scripts/netbird
Code: [Select]
#!/bin/sh
[ -r conf ] && . ./conf
exec netbird service run --log-level info 1>&2

Please help to make it work
Title: Re: [Help] dinit service for netbird
Post by: Arch_user on 22 October 2022, 16:56:17
If someone try this on runit also
https://github.com/netbirdio/netbird/issues/363#issuecomment-1180257811
Title: Re: [Help] dinit service for netbird
Post by: vaapicon on 23 October 2022, 05:35:01
Its missing PATH

/etc/dinit/environment
Code: [Select]
PATH=/usr/bin

/etc/dinit.d/netbird
Code: [Select]
type    = process
restart = true
command = /usr/bin/netbird service run --config /etc/netbird/config.json --log-level info --log-file /var/log/netbird.log 1>&2

or just export the path in your existing script
Quote
export PATH=/usr/bin
Title: Re: [Help] dinit service for netbird
Post by: Arch_user on 23 October 2022, 22:38:31
@vaapicon thank you for help
Title: Re: [Help] dinit service for netbird
Post by: davmac on 07 November 2022, 03:39:47

/etc/dinit.d/netbird
Code: [Select]
type    = process
restart = true
command = /usr/bin/netbird service run --config /etc/netbird/config.json --log-level info --log-file /var/log/netbird.log 1>&2


You don't want the "1>&2" at the end; dinit won't process it (so it becomes an argument to netbird-service-run, which probably won't understand it either). You shouldn't need it anyway.
Title: Re: [Help] dinit service for netbird
Post by: Arch_user on 07 November 2022, 05:40:00
ok ty