Skip to content

Commit

Permalink
cert related automation
Browse files Browse the repository at this point in the history
  • Loading branch information
nasirbest committed Aug 5, 2018
1 parent c03ec31 commit 8848722
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
22 changes: 22 additions & 0 deletions bin/freeswitch/certupdate
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

#** Load configurations for ICTCore *
#**********************************************************
source /usr/ictcore/bin/bash-ini-parser
cfg_parser /usr/ictcore/etc/ictcore.conf
cfg_section_website
company_host=$host

#** Generate certificates *
#**********************************************************

echo '' > /etc/freeswitch/tls/wss.pem
cat /etc/letsencrypt/live/$host/cert.pem >> /etc/freeswitch/tls/wss.pem
cat /etc/letsencrypt/live/$host/privkey.pem >> /etc/freeswitch/tls/wss.pem
cat /etc/letsencrypt/live/$host/chain.pem >> /etc/freeswitch/tls/wss.pem

#** Restart Apache and Freeswitch *
#**********************************************************
systemctl restart httpd.service
systemctl restart freeswitch.service

2 changes: 1 addition & 1 deletion bin/keygen
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ EOF
openssl genrsa -out ib_node 1024 > /dev/null
openssl rsa -in ib_node -pubout -out ib_node.pub >> /dev/null
openssl req -batch -new -config ib_node.cfg -key ib_node -out ib_node.csr > /dev/null
openssl x509 -req -days 365 -in ib_node.csr -signkey ib_node -out ib_node.crt > /dev/null
openssl x509 -req -days 3650 -in ib_node.csr -signkey ib_node -out ib_node.crt > /dev/null
cat ib_node > ib_node.pem
cat ib_node.crt >> ib_node.pem
rm -rf ib_node.csr ib_node.cfg
Expand Down
1 change: 1 addition & 0 deletions db/update/update_0.8.0-to-0.8.x.sql
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ INSERT INTO role_permission VALUES (NULL, @roleId, @permissionId); /* statisti
SELECT @permissionId := permission_id FROM permission WHERE name='configuration_read';
INSERT INTO role_permission VALUES (NULL, @roleId, @permissionId); /* configuration_read */

-- version 0.8.0.8
ALTER TABLE campaign CHANGE delay cpm int(11) NOT NULL default 2;
ALTER TABLE campaign CHANGE try_allowed try_allowed int(11) NOT NULL default 1;
1 change: 1 addition & 0 deletions etc/ictcore.cron
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ MAILTO=""
HOME=/usr/ictcore
* * * * * ictcore /usr/bin/php '/usr/ictcore/bin/cron.php' 2>/dev/null
10 0 * * * root /usr/bin/sbin /usr/sbin/ntpdate pool.ntp.org >/dev/null
10 0 * * * root /usr/bin/sbin /usr/ictcore/bin/letsencrypt.cron >/dev/null

0 comments on commit 8848722

Please sign in to comment.