Artix Linux Forum

Init systems => OpenRC => Topic started by: kekek on 07 February 2018, 04:54:00

Title: minidlna
Post by: kekek on 07 February 2018, 04:54:00
Minidlna use systemd.
Title: Re: minidlna
Post by: steve_v on 07 February 2018, 05:58:14
As it's only availabe from the Arch repos, this is to be expected. Feel free to contribute an OpenRC init scrip for it though.
Title: Re: minidlna
Post by: andre on 19 March 2018, 11:27:40
There may be an even simpler solution: I tested the software on a Devuan Ascii: just an install from the repository automatically included by Devuan...
sudo apt-get install minidlna
did the trick.
It included a standard Init-SysV script to be found in /etc/init.d
OpenRC can handle that, it worked right immediately.
You can download the source files from https://sourceforge.net/projects/minidlna/files/minidlna/1.2.1/, unpack it, ./configure with the right options and  compile it (make, sudo make install)
The tar package includes a sample LSB init script. If you are good at it, you could make an AUR package of it :-)
Good luck. André
Title: Re: minidlna
Post by: fungalnet on 19 March 2018, 14:21:49
There is OpenRC and eudev on ascii you can install, then look for the script there.
Title: Re: minidlna
Post by: andre on 19 March 2018, 15:33:13
The problem is: In Artix the /lib/lsb/init-functions are not implemented. It seems adherence to LSB standards could help....
Devuan ascii has implemented it.  Is there a package for LSB functions? I have found none so far.
Title: Re: minidlna
Post by: andre on 30 April 2018, 09:01:41
To all of you: hello
I have created a very minimalistic init script for you. It is tested and it works without any trouble.

Make sure you have the latest mirrorlist and pacman -Syu updates.
Then you install minidlana, it comes from some repo ready for Arix, but it provides no init-script.
sudo pacman -S minidlna

Now read this:

The Open-RC INIT script:
A very simplistic, minimal init script for OpenRC and minidlna
(Derived from file: /etc/init.d/ntpd)
-----------------------------------------

Configuration File:
/etc/minidlna.conf

PID File:
/var/run/minidlna/minidlna.pid

Watches:
8192 --> should be higher. i.e.:
echo 16384 > /proc/sys/fs/inotify/max_user_watches:


The Init Script:
/etc/init.d/minidlna:
----------------------------------------->
#!/usr/bin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# A very simple script to run minidlna, created for Artix Linux, Andre Kiepe 29-04-2018

description="minidlna - the minidlna multimedia server daemon"
pidfile="/run/minidlna/minidlna.pid"
command="/usr/bin/minidlnad"
command_args=""
start_stop_daemon_args=""

depend() {
   use net dns logger
   
}

start_pre() {
   if [ ! -f /etc/minidlna.conf ] ; then
      eerror "Please create /etc/minidlna.conf"
      return 1
   fi
   return 0
}
<-----------------------------------------

Set up service to autostart:
sudo sudo rc-update add minidlna

Start/Stop service:
sudo rc-service minidlna start
sudo rc-service minidlna stop

I hope I have not violated any copyright or whatever rule. It's just there to help you.
Tested on Sun, 29-APR-2018: Works perfectly well
Title: Re: minidlna
Post by: kekek on 23 June 2018, 10:32:32
https://github.com/artix-linux/packages-galaxy/pull/5
Title: Re: minidlna
Post by: andre on 25 June 2018, 09:58:27
Well, now, that looks nice. Thank you.
As soon as I can get a new artix-iso that installs and is actually able to do the update again..... I will test that new nice package.
Just when does such an iso come out (open-rc)? The old one (early 2018) fails constantly to update correctly. I seem to have no luck editing mirrorlists and paqcman.conf files.
Regards
Title: Re: minidlna
Post by: konimex on 25 June 2018, 12:12:04
Well, now, that looks nice. Thank you.
As soon as I can get a new artix-iso that installs and is actually able to do the update again..... I will test that new nice package.
Just when does such an iso come out (open-rc)? The old one (early 2018) fails constantly to update correctly. I seem to have no luck editing mirrorlists and paqcman.conf files.
Regards
You can install an OpenRC system from a runit iso.
Title: Re: minidlna
Post by: fungalnet on 25 June 2018, 13:56:48
You can install an OpenRC system from a runit iso.

The question is how to install a runit system from a runit-iso?
With both installation methods I ended up with an openrc installation.
Title: Re: minidlna
Post by: konimex on 25 June 2018, 15:21:49
The question is how to install a runit system from a runit-iso?
With both installation methods I ended up with an openrc installation.

What?
Just do "basestrap /mnt base base-devel runit".
Title: Re: minidlna
Post by: fungalnet on 26 June 2018, 23:37:32
What?
Just do "basestrap /mnt base base-devel runit".
Now I know
Title: Re: minidlna
Post by: SGOrava on 27 June 2018, 01:35:46

It is written in the wiki, in kind of little hidden way
Quote
Use basestrap to install the base and optionally the base-devel package groups and your preferred init (currently available: openrc and runit):
Code: [Select]
 basestrap /mnt base base-devel openrc
Title: Re: minidlna
Post by: andre on 29 July 2018, 12:39:46
Well, using the new iso (runit-iso, 20180604) I have installed a fresh system, openrc, and tested the new minidlna package.
Fine, it works well, so the issue is solved.
Thanks to all that put effort into it and for the hints.
It looks like the openrc is getting hold in our systemd-free world, ir's a wonderful solution. True to the open spirit.
Title: Re: minidlna
Post by: mrbrklyn on 31 January 2019, 12:25:51
To all of you: hello
I have created a very minimalistic init script for you. It is tested and it works without any trouble.

Make sure you have the latest mirrorlist and pacman -Syu updates.
Then you install minidlana, it comes from some repo ready for Arix, but it provides no init-script.
sudo pacman -S minidlna

Now read this:

The Open-RC INIT script:
A very simplistic, minimal init script for OpenRC and minidlna
(Derived from file: /etc/init.d/ntpd)
-----------------------------------------

Configuration File:
/etc/minidlna.conf

PID File:
/var/run/minidlna/minidlna.pid

Watches:
8192 --> should be higher. i.e.:
echo 16384 > /proc/sys/fs/inotify/max_user_watches:


The Init Script:
/etc/init.d/minidlna:
----------------------------------------->
#!/usr/bin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# A very simple script to run minidlna, created for Artix Linux, Andre Kiepe 29-04-2018

description="minidlna - the minidlna multimedia server daemon"
pidfile="/run/minidlna/minidlna.pid"
command="/usr/bin/minidlnad"
command_args=""
start_stop_daemon_args=""

depend() {
   use net dns logger
   
}

start_pre() {
   if [ ! -f /etc/minidlna.conf ] ; then
      eerror "Please create /etc/minidlna.conf"
      return 1
   fi
   return 0
}
<-----------------------------------------

Set up service to autostart:
sudo sudo rc-update add minidlna

Start/Stop service:
sudo rc-service minidlna start
sudo rc-service minidlna stop

I hope I have not violated any copyright or whatever rule. It's just there to help you.
Tested on Sun, 29-APR-2018: Works perfectly well


where is the start-stop-damean called?
Title: Re: minidlna
Post by: andre on 01 February 2019, 17:04:02
Hello mrbrklyn,
I will have a look into that as soon as I find the time.... I'm actually working mostly with devuan. But my proposed solution just worked fine on Artix - even if I don't know the magic behind it.
Title: Re: minidlna
Post by: andre on 03 February 2019, 13:48:25
Hello mrbrklyn,
the answer is here: https://github.com/OpenRC/openrc/blob/master/service-script-guide.md
The author even recommends to not write own start stop procedures: Don't write your own start/stop functions

And then, you refer to my older post, which has become obsolete. See my post from 6 month ago where I wrote:
********************
 Reply #13 – 6 months ago
Well, using the new iso (runit-iso, 20180604) I have installed a fresh system, openrc, and tested the new minidlna package.
Fine, it works well, so the issue is solved.
Thanks to all that put effort into it and for the hints.
It looks like the openrc is getting hold in our systemd-free world, ir's a wonderful solution. True to the open spirit.
********************
you might possibly think of installing minidlna AND minidlna-openrc if that exist in the artix repo. I believe it did then...
I work with Devuan now, and it's important to have the lsb-base installed to avoid a lot of trouble when dealing with init files.
But sure, Artix is as wonderful as well.
Good luck
Title: Re: minidlna
Post by: dxrobertson on 06 August 2019, 12:30:00
I know this is an old thread, but I would like to clarify something in regards to Devuan openrc.   Back earlier in this thread, Devuan init and LSB is discussed.

 Devuan (actually Debian) has heavily patched openrc for LSB support.  Devuan/Debian does not use openrc service init scripts (/etc/init.d).  They use sysvinit scripts with LSB, which works because of the LSB code modification in the openrc-run process. 

This allows for a minimal implementation of openrc, using the more Debian supported sysvinit;  as opposed to a pure openrc implementation as used by Artix.