Squeezelite: change the machine name Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Squeezelite: change the machine name

Post by Sciamano »

Hello,
I have two machines with squeezelite on it but both are identified as "DietPi-Squeezelite".
How can I change this, so that I can identify which player is which?
Thanks
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Squeezelite: change the machine name

Post by Fourdee »

Sciamano wrote:Hello,
I have two machines with squeezelite on it but both are identified as "DietPi-Squeezelite".
How can I change this, so that I can identify which player is which?
Thanks
Can be changed in the systemD service file:

Code: Select all

nano /etc/systemd/system/squeezelite.service

#refresh service
systemctl daemon-reload

#Restart services
dietpi-services restart
example of name change "MightyMoocow":

Code: Select all

ExecStart=/usr/bin/squeezelite -a 180 -C 5 -n 'MightyMoocow' -f /var/log/squeezelite.log
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Squeezelite: change the machine name

Post by Sciamano »

Great, thanks!!
That's why I couldn't find it: I was looking for a configuration file that does not exist :mrgreen:
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Squeezelite: change the machine name

Post by Fourdee »

Sciamano wrote:Great, thanks!!
That's why I couldn't find it: I was looking for a configuration file that does not exist :mrgreen:
Yep,

I decided to replace the old Sysinit service (and somewhat messy: http://www.gerrelt.nl/RaspberryPi/squeezelitehf.sh) with a simple SystemD one, and, apply config via command line.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Squeezelite: change the machine name

Post by Sciamano »

Fourdee wrote:I decided to replace the old Sysinit service (and somewhat messy: http://www.gerrelt.nl/RaspberryPi/squeezelitehf.sh) with a simple SystemD one, and, apply config via command line.
That was a good idea. :)
Pauduan
Posts: 12
Joined: Fri Nov 17, 2017 7:50 am

Re: Squeezelite: change the machine name

Post by Pauduan »

Hi

Sorry for the thread necro.

This is what I get:

dietpi@Pi3-Server:~$ sudo service squeezelite stop
dietpi@Pi3-Server:~$ sudo service squeezelite start
dietpi@Pi3-Server:~$ sudo nano /etc/systemd/system/squeezelite.service
dietpi@Pi3-Server:~$ sudo service squeezelite stop
dietpi@Pi3-Server:~$ ExecStart=/usr/bin/squeezelite -a 180 -C 5 -n 'Pi3-Server' -f /var/log/squeezelite.log
-bash: -a: command not found
dietpi@Pi3-Server:~$ ExecStart=/usr/bin/squeezelite -a 180 -C 5 -n 'Pi3-Server' -f /var/log/squeezelite.log

I tried changing it in LMS, but every time I restart the services they go back to the default DietPi-Squeezelite. Since I plan on migrating all my SBCs to Dietpi over the next year or so, I can't have the same name, that won't do at all.

The most irritating thing is that I do have another installation of DietPi on a ZeroW, for which a custom name is properly registered, and I have no idea how I did it.

Thanks for any help or hints on what I can do. I created the file as specified and ran the command but there must have been some updates that I missed out on. My knowledge of Linux is limited to Google.

Edit: I tried to start Squeezelite and I get this:

dietpi@Pi3-Server:~$ sudo service squeezelite start Failed to start squeezelite.service: Unit squeezelite.service has a bad unit file setting.
See system logs and 'systemctl status squeezelite.service' for details.
dietpi@Pi3-Server:~$ sudo service squeezelite start
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: Squeezelite: change the machine name

Post by Joulinar »

Hi,

I guess there is a misunderstanding on how to change the service configuration.

Code: Select all

ExecStart=/usr/bin/squeezelite -a 180 -C 5 -n 'Pi3-Server' -f /var/log/squeezelite.log
This is nothing to be executed on command line. This is the entry for the service file and would need to be change within the service configuration.

Pls have a look to our documentation. There is way a described on how to perform the change viewtopic.php?p=1009#p1009
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Pauduan
Posts: 12
Joined: Fri Nov 17, 2017 7:50 am

Re: Squeezelite: change the machine name

Post by Pauduan »

There's no misunderstanding :) I'm just plain incompetent.

Thanks for the tip, I'll have a look.

Edit: It's done, thanks. I never even knew that existed. You can tell I'm a Windows user given I don't RTFM. My bad, sorry!
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: Squeezelite: change the machine name

Post by Joulinar »

no problem, thats why we are here to help
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
posek
Posts: 4
Joined: Thu Sep 17, 2020 2:10 pm

Re: Squeezelite: change the machine name

Post by posek »

Hi Fourdee/Joulinar

I used your code to modified squeezelite name on Dietpi v6.29 succesed 8) on odroid C2 ,but now failure on v6.32 :lol:
eg: ExecStart=/usr/bin/squeezelite -a 180 -C 5 -n 'Pi3-Server'
When I reboot the machine, squeezelite still
Show “Dietpi-SqueezeLite” this problem has spoil my two weeks. :lol:
please give me a instructions, thanks
Post Reply