Pārlūkot izejas kodu

Generate a self signed certificate for the irc bouncer if needed

Bob Mottram 9 gadus atpakaļ
vecāks
revīzija
610d31845e
1 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  1. 7
    1
      src/freedombone-app-irc

+ 7
- 1
src/freedombone-app-irc Parādīt failu

57
 
57
 
58
 function start_irc_bouncer {
58
 function start_irc_bouncer {
59
     update_default_domain
59
     update_default_domain
60
-    su -c 'znc' - znc
60
+    if [ ! -f /home/znc/.znc/znc.pem ]; then
61
+        # no certificate exists
62
+        su -c 'znc -p' - znc
63
+    else
64
+        # an existing certificate is being used
65
+        su -c 'znc' - znc
66
+    fi
61
 }
67
 }
62
 
68
 
63
 function stop_irc_bouncer {
69
 function stop_irc_bouncer {