Alexander Afanasyev | 4c568f2 | 2014-05-23 17:18:06 -0700 | [diff] [blame^] | 1 | #!/bin/sh -e |
| 2 | |
| 3 | if [ "$1" != "configure" ]; then |
| 4 | exit 0 |
| 5 | fi |
| 6 | |
| 7 | APP=nfd-autoreg |
| 8 | |
| 9 | if [ ! -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 - |
| 15 | fi |
| 16 | |
| 17 | #DEBHELPER# |
| 18 | |
| 19 | exit 0 |