Check that avahi directory exists

This commit is contained in:
Bob Mottram 2016-01-02 11:02:06 +00:00
parent 70158b613b
commit 7fbb696e9a
1 changed files with 3 additions and 0 deletions

View File

@ -1263,6 +1263,9 @@ function create_avahi_onion_domains {
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
return return
fi fi
if [ ! -d /etc/avahi/services ]; then
return
fi
if [ $OWNCLOUD_DOMAIN_NAME ]; then if [ $OWNCLOUD_DOMAIN_NAME ]; then
echo '<?xml version="1.0" standalone="no"?><!--*-nxml-*-->' > /etc/avahi/services/owncloud.service echo '<?xml version="1.0" standalone="no"?><!--*-nxml-*-->' > /etc/avahi/services/owncloud.service
echo '<!DOCTYPE service-group SYSTEM "avahi-service.dtd">' >> /etc/avahi/services/owncloud.service echo '<!DOCTYPE service-group SYSTEM "avahi-service.dtd">' >> /etc/avahi/services/owncloud.service