| echo "Unrecognized option $1" |
| if pgrep -x $processName >/dev/null |
| echo 'NFD is already running...' |
| if ! ndnsec get-default &>/dev/null |
| ndnsec key-gen /localhost/operator | ndnsec cert-install - |
| echo 'Unable to obtain superuser privilege' |
| if [ -f @SYSCONFDIR@/ndn/nfd-init.sh ]; then |
| sleep 2 # post-start is executed just after nfd process starts, but there is no guarantee |
| # that all initialization has been finished |
| . @SYSCONFDIR@/ndn/nfd-init.sh |
| if [ -f @SYSCONFDIR@/ndn/autoconfig.conf ]; then |
| sleep 2 # post-start is executed just after nfd process starts, but there is no guarantee |
| @BINDIR@/ndn-autoconfig -d -c "@SYSCONFDIR@/ndn/autoconfig.conf" & |