1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006-2008 OpenWrt.org
8 if [ -s "/etc/stunnel/stunnel.pem" ]; then
9 chmod og-rwx
/etc
/stunnel
/stunnel.pem
12 [ -e /etc
/stunnel
/config
] && \
15 X509_CN
=${X509_CN:-"router"}
16 X509_O
=${X509_O:-"openwrt.org"}
17 X509_OU
=${X509_OU:-"open-source firmware"}
19 [ -x /sbin
/keygen
] && {
20 (keygen
"$X509_CN" "$X509_O" "$X509_OU" > /etc
/stunnel
/stunnel.pem
;
21 chmod og-rwx
/etc
/stunnel
/stunnel.pem
;