Browse Source

Generate a self signed certificate for the irc bouncer if needed

Bob Mottram 8 years ago
parent
commit
610d31845e
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      src/freedombone-app-irc

+ 7
- 1
src/freedombone-app-irc View File

@@ -57,7 +57,13 @@ irc_variables=(MY_USERNAME
57 57
 
58 58
 function start_irc_bouncer {
59 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 69
 function stop_irc_bouncer {