Files
infix/package/mech/prep-db
T
2023-03-28 20:27:18 +02:00

20 lines
472 B
Bash
Executable File

#!/bin/sh
set -e
FACTORY=/mnt/tmp/infix/db/factory_db
# TODO: Maybe copy in a proper factory config from
# /usr/share/vendor/<hardware-id>_db or similar.
# Right now we generate one from probed data.
cat <<EOF >$FACTORY
<config>
<restconf xmlns="http://clicon.org/restconf">
<enable>true</enable>
<auth-type>none</auth-type>
<fcgi-socket>/run/clixon/restconf.sock</fcgi-socket>
</restconf>
</config>
EOF
[ -f /cfg/startup_db ] || cp "$FACTORY" /cfg/startup_db