blob: 8b04456e328a1977916c525c5bfe23d9e7841c70 [file] [log] [blame]
Alexander Afanasyev94c793a2015-07-23 04:11:36 +00001#!/bin/sh -e
2
3if [ "$1" != "configure" ]; then
4 exit 0
5fi
6
7APP=ndnping
8
Zhiyi Zhangc8050a92018-01-21 17:33:16 -08009if [ ! -f /var/lib/ndn/$APP/.ndn/pib.db ]; then
Alexander Afanasyev94c793a2015-07-23 04:11:36 +000010 # 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