blob: b5e8a80ed50cc4bd6706f59894a100b044ce7baa [file] [log] [blame]
#!/bin/sh
NICKNAME=
if [ -e /config/nickname ]; then
NICKNAME="$(cat /config/nickname)"
fi
NEWNICKNAME=
watch-dir /config | while read f; do
[ -e /config/nickname ] && NEWNICKNAME="$(cat /config/nickname)"
if [ "$NICKNAME" != "$NEWNICKNAME" ]; then
echo 'Nickname changed, restarting servers'
QUIET=1 restart dialserver upnpd
NICKNAME="$NEWNICKNAME"
fi
done