-
Notifications
You must be signed in to change notification settings - Fork 2
/
run_ocspd.sh
executable file
·54 lines (45 loc) · 1.42 KB
/
run_ocspd.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
cd /usr/local/ocspd/
if [ -f "/data/ocspd/ca.crt" ]
then
if [ ! -f "/usr/local/ocspd/etc/ocspd/certs/ca.crt" ]
then
ln -s /data/ocspd/ca.crt /usr/local/ocspd/etc/ocspd/certs/ca.crt
fi
else
echo "/data/ocspd/ca.crt not found: please add volume /data/ocspd/ with ca.crt, ocspd.crt, ocspd.key and crl.crl to container"
exit 1
fi
if [ -f "/data/ocspd/ocspd.crt" ]
then
if [ ! -f "/usr/local/ocspd/etc/ocspd/certs/ocspd.crt" ]
then
ln -s /data/ocspd/ocspd.crt /usr/local/ocspd/etc/ocspd/certs/ocspd.crt
fi
else
echo "/data/ocspd/ocspd.crt not found: please add volume /data/ocspd/ with ca.crt, ocspd.crt, ocspd.key and crl.crl to container"
exit 1
fi
if [ -f "/data/ocspd/ocspd.key" ]
then
if [ ! -f "/usr/local/ocspd/etc/ocspd/private/ocspd.key" ]
then
ln -s /data/ocspd/ocspd.key /usr/local/ocspd/etc/ocspd/private/ocspd.key
fi
else
echo "/data/ocspd/ocspd.key not found: please add volume /data/ocspd/ with ca.crt, ocspd.crt, ocspd.key and crl.crl to container"
exit 1
fi
if [ -f "/data/ocspd/crl.crl" ]
then
if [ ! -f "/usr/local/ocspd/etc/ocspd/crls/crl.crl" ]
then
ln -s /data/ocspd/crl.crl /usr/local/ocspd/etc/ocspd/crls/crl.crl
fi
else
echo "/data/ocspd/crl.crl not found: please add volume /data/ocspd/ with ca.crt, ocspd.crt, ocspd.key and crl.crl to container"
exit 1
fi
chown -R ocspd:ocspd /usr/local/ocspd/
sleep 1
/usr/local/ocspd/sbin/ocspd -stdout -c /usr/local/ocspd/etc/ocspd/ocspd.xml