mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-21 19:59:09 +00:00
added rc-once script to initialize uuid on first start
This commit is contained in:
parent
74c6ab5a46
commit
f7ec37d92f
11
miniupnpd/miniupnpd.rc.once.d.script
Normal file
11
miniupnpd/miniupnpd.rc.once.d.script
Normal file
@ -0,0 +1,11 @@
|
||||
#!/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"
|
Loading…
x
Reference in New Issue
Block a user