Commit | Line | Data |
---|---|---|
66443416 MW |
1 | ### -*-sh-*- |
2 | ||
dff15e49 MW |
3 | cmd=bin/update |
4 | ||
66443416 MW |
5 | make_key_line () { |
6 | user=$1 | |
7 | hosts="" | |
8 | zone="" | |
9 | while read u hh; do | |
10 | case $u in "" | \#*) continue ;; esac | |
11 | case $user in $u) ;; *) continue ;; esac | |
12 | for h in $hh; do | |
13 | case $h in | |
14 | zone=*) zone=${h#*=} ;; | |
15 | *) hosts=${hosts:+$hosts }$h ;; | |
16 | esac | |
17 | done | |
18 | done <domains.conf | |
19 | case ${hosts+t} in t) ;; *) continue ;; esac | |
20 | line="environment=\"DYNDNS_HOST=$hosts\"" | |
21 | line="$line${zone:+,environment=\"DYNDNS_ZONE=$zone\"}" | |
66443416 MW |
22 | echo "$line" |
23 | } |