DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

DietPi-Software | GMediaRender: Change service name to "gmediarender.service"

Open KenMoreira opened this issue 3 years ago • 8 comments

After updating from 9 to bullseye I have 2 copies of GMrender, only one works. It's causing issues where my streamer (allo usbridge) diet pi. Stops working and needs reboot.

16550544454627941693809961987755

KenMoreira avatar Jun 12 '22 17:06 KenMoreira

Were you able to solve it yourself? What was the issue? Probably we need to add a step to our Stretch => Buster or Buster => Bullseye upgrade guide.

MichaIng avatar Jun 19 '22 09:06 MichaIng

I ran uninstall, and it uninstalled the newest copy which wasn't ever able to work.

Still unable to even find the version that is installed. In my Dir. I was hoping to update it. It's an old one

KenMoreira avatar Jun 19 '22 10:06 KenMoreira

Please check the following:

dpkg -l | grep -E 'gmediarender|gmrender'
command -v gmediarender gmrender
systemctl cat gmediarender
systemctl cat gmrender

MichaIng avatar Jun 19 '22 11:06 MichaIng

root@KensBridge:~# dpkg -l | grep -E 'gmediarender|gmrender'

root@KensBridge:~# command -v gmediarender gmrender
/usr/local/bin/gmediarender

root@KensBridge:~# systemctl cat gmediarender
No files found for gmediarender.service.

root@KensBridge:~# systemctl cat gmrender
# /etc/systemd/system/gmrender.service

[Unit]
Description=GMediaRender (DietPi)
Documentation=https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md#commandline-options
Wants=network-online.target
After=network-online.target sound.target dietpi-boot.service

[Service]
User=gmrender
ExecStartPre=+/bin/bash -c '. /boot/dietpi/func/dietpi-globals; systemctl set-environment ACTIVE_IP=$(G_GET_NET ip)'
ExecStart=/usr/local/bin/gmediarender -u 'ed987da7-8247-4ac6-ac0e-f58a33c89e02' -f 'KensBridge' --gstout-audiosink=al
sasink --gstout-audiodevice=default --logfile=stdout -I "$ACTIVE_IP"

[Install]
WantedBy=multi-user.target

KenMoreira avatar Jun 19 '22 11:06 KenMoreira

That looks all correct like the latest GMediaRender implementation. It doesn't look like you uninstalled GMediaRender via dietpi-software, else those files all shouldn't exist.

When you do dietpi-software install 163, how do you know that there are two instances, can you show the related logs? Might it be simply that the player still has the old instance ID/name in cache and you need to change the new service ExecStart options to restore the previous ID/name?

MichaIng avatar Jun 19 '22 12:06 MichaIng

there WAS two copies , i uninstalled one on my own from google searching the other day

KenMoreira avatar Jun 19 '22 14:06 KenMoreira

Ah okay, I guess it was the gmediarender APT package then, which installs a service called gmediarender.service, but the two services fail due to network port conflict.

MichaIng avatar Jun 19 '22 15:06 MichaIng

I made an enhancement out of this issue, with the goal to change the service and user name on our implementation to "gmediarender" to align it with the Debian package. That way it wouldn't be possible anymore to have two conflicting services running.

MichaIng avatar Jun 23 '22 19:06 MichaIng

Implemented for DietPi v8.10, along with a general update and packaging of GMediaRender: #5811

MichaIng avatar Oct 16 '22 19:10 MichaIng