Add support for DOMAIN and WORKGROUP.

This commit is contained in:
Jonas Pedersen 2019-06-24 17:06:29 +02:00
parent 7093be25ef
commit f1aa1db3fb
2 changed files with 18 additions and 1 deletions

View file

@ -3,6 +3,13 @@ Docker image for wsdd.py.
wsdd implements a Web Service Discovery host daemon. This enables (Samba) hosts, like your local NAS device or Linux server, to be found by Web Service Discovery Clients like Windows. wsdd implements a Web Service Discovery host daemon. This enables (Samba) hosts, like your local NAS device or Linux server, to be found by Web Service Discovery Clients like Windows.
## Supported environment variables
HOSTNAME: Samba Netbios name to report.
WORKGROUP: Workgroup name
DOMAIN: Report being a member of an AD DOMAIN. Disables WORKGROUP if set.
## Running container ## Running container
### From command line ### From command line
``` ```

View file

@ -3,11 +3,21 @@
args=( ) args=( )
if [ ! -z "${HOSTNAME}" ]; then if [ ! -z "${HOSTNAME}" ]; then
args+=( "-n $HOSTNAME") args+=( "-n $HOSTNAME ")
else else
echo "HOSTNAME environment variable must be set." echo "HOSTNAME environment variable must be set."
exit 1 exit 1
fi fi
if [ ! -z "${WORKGROUP}" ]; then
args+=( "-w $WORKGROUP " )
fi
if [ ! -z "${DOMAIN}" ]; then
args+=( "-d $DOMAIN " )
fi
python wsdd.py ${args} python wsdd.py ${args}