miniupnpc/miniupnpd/miniupnpd.rc.once.d.script
2017-09-03 16:59:19 +02:00

12 lines
252 B
Bash

#!/bin/sh
#
# generate a UUID on first system start
#
UUID=`uuidgen`
CONFFILE=/etc/miniupnpd/miniupnpd.conf
mv "${CONFFILE}" "${CONFFILE}.before"
sed -e "s/^uuid=[-0-9a-fA-F]*/uuid=$UUID/" "${CONFFILE}.before" > "${CONFFILE}"
rm "${CONFFILE}.before"