Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Commit

Permalink
Added option to set DiskStation hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoraddatz committed Dec 17, 2017
1 parent 42b4c70 commit a424410
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 4.2
- Added option to set DiskStation hostname ([\#7](https://github.com/marcoraddatz/homebridge-docker/issues/7))

## 4.1
- Default Homebridge version is v0.4.32
- Updated Node.js to version 9.2
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1
4.2
12 changes: 12 additions & 0 deletions image/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ then
rm /etc/localtime
ln -s /usr/share/zoneinfo/${HOMEBRIDGE_TIMEZONE} /etc/localtime
date

echo "Updated timezone to '$HOMEBRIDGE_TIMEZONE'.".
fi

# Fix for Synology DSM
# See https://github.com/oznu/docker-homebridge/commit/8e5ef5e7b3480b50f59dc3717f493d27f4070df1
# See https://github.com/oznu/docker-homebridge/issues/35
if [ "$DS_HOSTNAME" ]
then
sed -i "s/.*host-name.*/host-name=${DS_HOSTNAME}/" /etc/avahi/avahi-daemon.conf

echo "Avahi hostname set to '$DS_HOSTNAME'."
fi

rm -f /var/run/dbus/pid /var/run/avahi-daemon/pid
Expand Down
6 changes: 6 additions & 0 deletions samples/.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ HOMEBRIDGE_TIMEZONE=Europe/Berlin
# Default version is "latest"
# See https://docs.npmjs.com/cli/install for more info
HOMEBRIDGE_VERSION=latest

# The value of the DSM_HOSTNAME environment should exactly match the server name as shown under
# "Synology DSM Control Panel" -> "Info Centre" -> "Server name", it should contain no spaces or special characters.
# Default is unset.
# DO ONLY SET IF YOU GOT PROBLEMS RUNNING HOMEBRIDGE!
#DS_HOSTNAME=

0 comments on commit a424410

Please sign in to comment.