Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allo.com image - from Web admin page, gmrender service enable FAILS - No gmrender.service file #48

Closed
c3kkos opened this issue May 12, 2023 · 2 comments · Fixed by #49
Closed
Labels
bug Something isn't working

Comments

@c3kkos
Copy link

c3kkos commented May 12, 2023

Creating a bug report/issue

this applies for:
DietPi - Allo.com Web GUI Image

Required Information

  • DietPi version | cat /boot/dietpi/.version

G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=17
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN

  • bullseye 0

  • Kernel version | uname -a

  • Linux mini3 6.1.21-v8+ MichaIng/DietPi#1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

  • rpi3 mod A+

  • Power supply used | (EG: 5V 1A RAVpower)

  • 5V 2,5A

  • SD card used | (EG: SanDisk ultra)

  • SanDisk ultra

Steps to reproduce

  1. open web interface, try to enable gmrender. it fails
  2. ssh'd into rpi, to check systemctl status gmrender.service. NO file present, hence no service to enable

Expected behaviour

  • gmservice to be correctly present in root filesystem

Actual behaviour

  • no way to enable gmrender
@c3kkos
Copy link
Author

c3kkos commented May 12, 2023

this is the allo.com version image, freshly downloaded and flashed with Rufus.

Everything up&running fine, but gmrender.

I've taken the file from the author's git, and done
(link: https://github.com/hzeller/gmrender-resurrect/blob/master/dist-scripts/debian/gmrender-resurrect.service)
sudo mkdir /var/log/gmrender-resurrect
sudo nano /etc/systemd/system/gmrender.service

'''

[Unit]
Description=gmrender service
After=network.target sound.target

[Service]
Environment="UPNP_DEVICE_NAME=Raspberry"
ExecStartPre=/bin/sh -c "/bin/systemctl set-environment UPNP_UUID=ip link show | awk '/ether/ {print \"salt:)-\" $2}' | head -1 | md5sum | awk '{print $1}'"

ExecStart=/usr/bin/gmediarender -f "$UPNP_DEVICE_NAME" -u "$UPNP_UUID"
--gstout-audiosink=alsasink --gstout-audiodevice=sysdefault
--logfile=/var/log/gmrender-resurrect/gmediarenderer.log --gstout-initial-volume-db=-10
Restart=always

[Install]
WantedBy=multi-user.target

'''

this is my dirty fix

variables UPNP_DEVICE_NAME, UPNP_DEVICE_NAME not working though

@c3kkos c3kkos changed the title Web server gmrender enable FAILS - No gmrender.service file Allo.com image - from Web admin page, gmrender service enable FAILS - No gmrender.service file May 12, 2023
@MichaIng MichaIng transferred this issue from MichaIng/DietPi May 15, 2023
@MichaIng MichaIng added the bug Something isn't working label May 15, 2023
MichaIng added a commit that referenced this issue May 15, 2023
Since services on DietPi are now regularly enabled and won't be controlled by DietPi-Services if disabled, the Allo GUI can toggle the service state commonly this way and does not need to mask or rename them.

Also use the new GMediaRender service name, changed with v8.10: #48
@MichaIng MichaIng linked a pull request May 15, 2023 that will close this issue
MichaIng added a commit that referenced this issue May 15, 2023
* Update service controller for DietPi v8.16

Since services on DietPi are now regularly enabled and won't be controlled by DietPi-Services if disabled, the Allo GUI can toggle the service state commonly this way and does not need to mask or rename them.

Also use the new GMediaRender service name, changed with v8.10: #48

* Rebuilt PHP dependencies and Laravel Mix
@MichaIng
Copy link
Owner

Many thanks for your report. Indeed this service name has changed. Fix is here: #49

Before I do an official release (implying an update for all Allo GUI users on next DietPi update), would you give it a try, please? For this, copy the below code block into some root user SSH session.

G_EXEC cd /tmp
G_EXEC curl -LO 'https://github.com/MichaIng/DietPi-AlloGUI/archive/refs/heads/main.tar.gz'
G_EXEC tar xf main.tar.gz
G_EXEC rm main.tar.gz
G_EXEC mv DietPi-AlloGUI-main allo
G_EXEC chmod -R 'o=,g-w' allo
G_EXEC chgrp -R www-data allo
G_EXEC chmod -R 'g=' allo/storage allo/bootstrap/cache
G_EXEC find allo/{storage,bootstrap/cache} -type d -exec chown www-data {} +
db_password=$(tr -dc '[:alnum:]' < /dev/random | head -c32)
mysql -e "grant all privileges on allo.* to allo@localhost identified by '$db_password';"
GCI_PASSWORD=1 G_CONFIG_INJECT 'DB_PASSWORD=' "DB_PASSWORD=$db_password" allo/.env
unset -v db_password
GCI_PASSWORD=1 G_CONFIG_INJECT 'APP_KEY=' "APP_KEY=base64:$(base64 < <(tr -dc '[:graph:]' < /dev/urandom | head -c32))" allo/.env
G_EXEC rm -R /opt/allo
G_EXEC mv allo /opt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants