Artix Linux Forum

Init systems => OpenRC => Topic started by: realbarackobama on 11 October 2021, 07:07:08

Title: Init script for jellyfin media server
Post by: realbarackobama on 11 October 2021, 07:07:08
For a little bit I was stuck with systemd manjaro, but in that time I discovered jellyfin (https://jellyfin.org), a cool little media server.
When I went back to artix I was disappointed at the lack of an openrc init script for jellyfin, so I made one. I've never made an init script before, so this is definitely horribly flawed.
I'm looking for ways to improve this, from the community.

Code: [Select]
#!/usr/bin/openrc-run
command=/usr/bin/dotnet
command_args="/usr/lib/jellyfin/jellyfin.dll --datadir ${JELLYFIN_DATA_DIRECTORY} --cachedir ${JELLYFIN_CACHE_DIRECTORY} ${JELLYFIN_ADD_OPTS}"
command_user="jellyfin:jellyfin"
pidfile="/var/cache/jellyfin/jellyfin.pid"

command_background=true

depend(){
    need net
    need localmount
}
P.S. jellyfin isn't available in any of the default repos, turn to the AUR
Title: Re: Init script for jellyfin media server
Post by: Arch_user on 11 October 2021, 12:14:07
Use this website http://openrc.run/ to convert systemd service into openrc service