blob: 76d79e47779ffabf683546bebe2ba0c8ae16a2f4 [file] [log] [blame]
Alexander Afanasyeva2e423f2014-08-19 15:26:15 -05001#!/bin/sh -e
2
3if [ "$1" != "configure" ]; then
4 exit 0
5fi
6
7APP=ndn-autoconfig-server
8
9if [ ! -f /var/lib/ndn/$APP/.ndn/ndnsec-public-info.db ]; then
10 # Create HOME and generate self-signed NDN certificate
11 sudo mkdir -p /var/lib/ndn/$APP/.ndn
12 sudo chown -R ndn:ndn /var/lib/ndn/$APP
13 sudo -u ndn -g ndn HOME=/var/lib/ndn/$APP ndnsec-keygen /localhost/daemons/$APP | \
14 sudo -u ndn -g ndn HOME=/var/lib/ndn/$APP ndnsec-install-cert -
15fi
16
17#DEBHELPER#
18
19exit 0