File: postinst

package info (click to toggle)
stone 2.4-1.2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 476 kB
  • sloc: ansic: 10,694; makefile: 326; sh: 35
file content (28 lines) | stat: -rw-r--r-- 516 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

set -e

cd /etc/ssl/certs
PATH=$PATH:/usr/bin/ssl
if [ -f stone.pem ]
then
    echo "You already have `pwd`/stone.pem"
else
    xHOSTNAME=`hostname -s`
    xDOMAINNAME=`hostname -d`
    openssl req -new -x509 -nodes -out stone.pem -keyout stone.pem > /dev/null 2>&1 <<+
.
.
.
$xDOMAIN_NAME
$xHOST_NAME
stone
root@$xHOST_NAME.$xDOMAIN_NAME
+
#    req -new -x509 -nodes -out stone.pem -keyout stone.pem
    ln -sf stone.pem `openssl x509 -noout -hash < stone.pem`.0
    chmod 644 stone.pem

fi

#DEBHELPER#