| #!/bin/sh -e |
| |
| if [ "$1" != "configure" ]; then |
| exit 0 |
| fi |
| |
| |
| if [ ! -d /var/log/ndn ]; then |
| mkdir -p /var/log/ndn |
| chown -R ndn:ndn /var/log/ndn |
| fi |
| |
| if [ ! -f /etc/ndn/certs/localhost_daemons_nrd.ndncert ]; then |
| # Create HOME and generate self-signed NDN certificate for nfd |
| mkdir -p /var/lib/ndn/nfd/.ndn |
| ( |
| export HOME=/var/lib/ndn/nfd |
| ndnsec-keygen /localhost/daemons/nfd | ndnsec-install-cert - |
| ) |
| |
| # Create HOME and generate self-signed NDN certificate for nrd |
| # Dump RIB Management daemon's certificate |
| mkdir -p /var/lib/ndn/nrd/.ndn |
| ( |
| export HOME=/var/lib/ndn/nrd |
| ndnsec-keygen /localhost/daemons/nrd | ndnsec-install-cert - |
| |
| mkdir /etc/ndn/certs |
| ndnsec-dump-certificate -i /localhost/daemons/nrd > \ |
| /etc/ndn/certs/localhost_daemons_nrd.ndncert |
| ) |
| fi |
| |
| chown -R ndn:ndn /var/lib/ndn |
| |
| #DEBHELPER# |
| |
| exit 0 |