blob: 92a7ec93261cfc9a692887c252de4e8d9100e5dc [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
Zhiyi Zhangc8050a92018-01-21 17:33:16 -08009if [ ! -f /var/lib/ndn/$APP/.ndn/pib.db ]; then
Alexander Afanasyevb4da9eb2014-05-24 16:52:17 -070010 # 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
Davide Pesavento3b0bfe82022-04-24 22:25:11 -040013 sudo -u ndn -g ndn HOME=/var/lib/ndn/$APP ndnsec key-gen /localhost/daemons/$APP | \
14 sudo -u ndn -g ndn HOME=/var/lib/ndn/$APP ndnsec cert-install -
Alexander Afanasyevb4da9eb2014-05-24 16:52:17 -070015fi
16
17#DEBHELPER#
18
19exit 0