Originally posted by [email protected]
systemd service file for LMS
Collapse
X
-
systemd service file for LMS
> I tried the service scripy on Raspberry Pi 4 with Ubuntu Server 20.04
> arm64 with no luck (latest 8 build). The service fails to start. I do
> get the Perl error: > DBI EV XML::Parser::Expat HTML::Parser JSON::XS Digest::SHA1 YAML::XS
This most likely has nothing to do with the startup script. It's rather
lack of binary support your system's Perl. What would "perl -v" say?
--
Michael
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)Comment
-
Is arm64 the same as aarch64 ?Comment
-
I assume you can still just follow the instructions to build the required perl modules and then use your service file for systemd?Comment
-
As an aside, I find the following yields a useful diagnostic system log extract (in reverse order).
Code:sudo journalctl -r -u logitechmediaserver
Comment
-
-
systemd service file for LMS
On Sat, 23 Jan 2021 11:49:35 +0000, scytale
<scytale.9vxglb (AT) no-mx (DOT) forums.slimdevices.com> wrote:
> How has this been working out?
There is a logitechmediaserver.service in the debian and raspberry kits
that works well.
-- Johan
Comment
-
systemd service file for LMS
On Sat, 23 Jan 2021 15:07:31 +0100, Johan Vromans <jvromans (AT) squirrel (DOT) nl>
wrote:
> There is a logitechmediaserver.service in the debian and raspberry kits
> that works well.
Oops... It's not in the kit. I don't know where I got it from.
I've attached it.
After install of LMS remove SysV script:
sudo systemctl stop logitechmediaserver.service
sudo rm /etc/rc*.d/*logitechmediaserver
Use systemctl script:
sudo install logitechmediaserver.service.txt /etc/systemd/system/logitechmediaserver.service
sudo systemctl daemon-reload sudo systemctl enable logitechmediaserver.service
sudo systemctl start logitechmediaserver.service
HTH,
-- Johan
Comment
-
Originally posted by [email protected]On Sat, 23 Jan 2021 15:07:31 +0100, Johan Vromans <jvromans (AT) squirrel (DOT) nl>
wrote:
> There is a logitechmediaserver.service in the debian and raspberry kits
> that works well.
Oops... It's not in the kit. I don't know where I got it from.
I've attached it.
After install of LMS remove SysV script:
sudo systemctl stop logitechmediaserver.service
sudo rm /etc/rc*.d/*logitechmediaserver
Use systemctl script:
sudo install logitechmediaserver.service.txt /etc/systemd/system/logitechmediaserver.service
sudo systemctl daemon-reload sudo systemctl enable logitechmediaserver.service
sudo systemctl start logitechmediaserver.service
HTH,
-- JohanComment
-
systemd service file for LMS
On Sat, 23 Jan 2021 21:36:22 +0000, mfraser
<mfraser.9vy7tc (AT) no-mx (DOT) forums.slimdevices.com> wrote:
> There's nothing attached.
There is, in my copy of the message...
Anyway, try
Comment
-
This looks very useful - especially when debugging start up issues.
There are better way of spending time than reading through yet another shell start up script.
What's the best way forward with this? At a guess:
- fork slimserver-platforms
- pick one of the linux environments
- replace the init script with the systemd file
- make whatever other changes are required to the build configuration to get it to use the unit file instead of the init script
- build the package
- install, test and fix until it works across an acceptable range of versions
- move on to the next environment
The environments in question would be:
- debian
- gentoo
- redhat
We don't need to bother with:
- fedora - superceded by redhat
- readynas ?????
- solaris - still uses some kind of shell based init, right?
Sounds feasible?Comment
-
Also it looks like at least in Debian it is fairly striaghtforward to use a postinst script to determine if systemd or sysVinit are in use an install the apropriate file:
Check out this stackexchange answer
Basically:
Code:if [[ `systemctl` =~ -\.mount ]] then cp $serviceDir/service-systemd /lib/systemd/system/$serviceName.service elif [[ -f /etc/init.d/cron && ! -h /etc/init.d/cron ]] then cp $serviceDir/service-sysvinit /etc/init.d/$serviceName fi
Comment
-
systemd service file for LMS
> What's the best way forward with this? At a guess:
>
> - fork slimserver-platforms
> - pick one of the linux environments
> - replace the init script with the systemd file
> - make whatever other changes are required to the build configuration
> to get it to use the unit file instead of the init script
> - build the package
> - install, test and fix until it works across an acceptable range of
> versions
> - move on to the next environment
- submit pull request ;-)
> The environments in question would be:
>
> - debian
> - gentoo
> - redhat
I'm not sure gentoo is worth it. I doubt there still are users of these
files.
> We don't need to bother with:
>
> - fedora - superceded by redhat
> - readynas ?????
I've officially declared readynas support dead with LMS8. This support
always ever covered the old 1st/2nd generation devices running Perl
5.8/5.10, but none of the more recent (like... past 5 years) systems.
> - solaris - still uses some kind of shell based init, right?
I believe there are some community members who maintain solaris support
in a different form, outside this repository.
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)Comment
-
Also it looks like at least in Debian it is fairly striaghtforward to use a postinst script to determine if systemd or sysVinit are in use an install the apropriate file:
Check out this stackexchange answer
I don't regularly maintain Debian packages, so any insight welcome.
Which is what I was planning to do, for Debian only, after testing the service file that I originally suggested for a suitable period of time.
Well, three months have passed and I have not experienced any issue on the few occasions I have started/stopped LMS in that time, and no-one else has reported any. I suppose some people may have tested .
So, I guess the time has come. I'll await @scytales's input.Comment
Comment