YunoHost-Apps / squid3_ynh

Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more.
http://www.squid-cache.org/
GNU General Public License v2.0
4 stars 2 forks source link

Service squid3 is unknown #6

Closed snm247 closed 2 years ago

snm247 commented 2 years ago

Describe the bug

YunoHost diagnosis shows the following warning:

Service squid3 is unknown :(

You can try to restart the service, and if it doesn't work, have a look at the service logs in the webadmin (from the command line, you can do this with yunohost service restart squid3 and yunohost service log squid3).

Context

Steps to reproduce

squid3: 
  configuration: unknown
  description: Error: failed to get information for this service, it doesn't exists for systemd
  last_state_change: unknown
  start_on_boot: unknown
  status: unknown

It seems YunoHost diagnosis checks the wrong service name.

Expected behavior

YunoHost diagnosis should check the correct service name.

Flashpok commented 2 years ago

Same bug here. Squid works, but we can't strop service with administration YHost interface. How can I repair this ? (replace "squid3" by "squid" service?) Thanks you

snm247 commented 2 years ago

I guess the bug is caused by this line in the install script:

yunohost service add $app --description "Squid3 a web proxy service" --log="/var/log/$squid/access.log" --needs_exposed_ports $squid_port

$app is squid3 while the service (in my case) is named squid.

Maybe it is sufficient to replace $app with $squid which is squid3 or squid depending on the existence of /etc/squid3 or /etc/squid?

@Flashpok I don't know how to replace squid3 with squid in the admin interface. But you can stop the service with the following command:

systemctl stop squid.service
alexAubin commented 2 years ago

Fixed by https://github.com/YunoHost-Apps/squid3_ynh/commit/d4ca899dcbab2ee3400bfe159ea387fd430a13a9 and subsequent commits