blob: d64684ab43f1318ce1a089e4ad320c9da1782989 [file] [log] [blame]
Alexander Afanasyevb4da9eb2014-05-24 16:52:17 -07001#!/bin/sh -e
2
3if [ "$1" != "configure" ]; then
4 exit 0
5fi
6
7APP=repo-ng
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