source: n4d/trunk/fuentes/debian/n4d.postinst @ 108

Last change on this file since 108 was 108, checked in by hectorgh, 4 years ago

wip

File size: 461 bytes
Line 
1#!/bin/sh
2
3set -e
4FILESECRET="/etc/n4d/key"
5CERTPATH="/etc/n4d/cert/"
6CERTNAME="n4d"
7case "$1" in
8   configure)
9        if [ ! -e "$FILESECRET" ]; then
10                cat /dev/urandom 2>/dev/null | tr -dc '0-9a-zA-Z' 2>/dev/null |{ head -c 50;echo ""; } > $FILESECRET
11        fi
12        chmod 400 $FILESECRET
13        chown root:root $FILESECRET
14       
15        /usr/share/n4d/certgen/n4d-certgen
16
17       
18   ;;
19
20   abort-upgrade|abort-remove|abort-deconfigure)
21   ;;
22
23   *)
24       exit 1
25   ;;
26esac
27
28#DEBHELPER#
29
30exit 0
31
Note: See TracBrowser for help on using the repository browser.