** Description changed: - after restart the `squid-deb-proxy` in syslog: `Failed to load service + After restart the `squid-deb-proxy` in syslog: `Failed to load service group file /services/squid-deb-proxy.service, ignoring.` So i added the : - service avahi-daemon reload + service avahi-daemon reload - in `/usr/share/squid-deb-proxy# nano init-common.sh` + in the `/usr/share/squid-deb-proxy/init-common.sh` - at the last line of post_start: + at the last line of the `post_start` function: - post_start() { - # create avahi service - PORT=$(grep http_port /etc/squid-deb-proxy/squid-deb-proxy.conf|cut -d' ' -f2) - if [ -n "$PORT" ] && [ -d /etc/avahi/services/ ]; then - cat > $AVAHIFILE << EOF - <?xml version="1.0" standalone='no'?> - <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> - <service-group> - <name replace-wildcards="yes">Squid deb proxy on %h</name> - <service protocol="ipv6"> - <type>_apt_proxy._tcp</type> - <port>$PORT</port> - </service> - <service protocol="ipv4"> - <type>_apt_proxy._tcp</type> - <port>$PORT</port> - </service> - </service-group> - EOF - # ensure proper permissions - chmod 0644 $AVAHIFILE - fi + post_start() { + # create avahi service + PORT=$(grep http_port /etc/squid-deb-proxy/squid-deb-proxy.conf|cut -d' ' -f2) + if [ -n "$PORT" ] && [ -d /etc/avahi/services/ ]; then + cat > $AVAHIFILE << EOF + <?xml version="1.0" standalone='no'?> + <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> + <service-group> + <name replace-wildcards="yes">Squid deb proxy on %h</name> + <service protocol="ipv6"> + <type>_apt_proxy._tcp</type> + <port>$PORT</port> + </service> + <service protocol="ipv4"> + <type>_apt_proxy._tcp</type> + <port>$PORT</port> + </service> + </service-group> + EOF + # ensure proper permissions + chmod 0644 $AVAHIFILE + fi - service avahi-daemon reload + service avahi-daemon reload - } - + } Now, it's working perfectly
-- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to squid-deb-proxy in Ubuntu. https://bugs.launchpad.net/bugs/1491663 Title: avahi doesn't load the services/squid-deb-proxy.service To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1491663/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs