1 |
--- smeserver-ocsinventory-0.1/createlinks.cert_change 2009-03-19 12:07:00.000000000 +0100 |
2 |
+++ smeserver-ocsinventory-0.1/createlinks 2009-03-25 13:49:31.000000000 +0100 |
3 |
@@ -4,12 +4,15 @@ |
4 |
|
5 |
|
6 |
my $event = 'ocs-update'; |
7 |
-templates2events("/etc/httpd/conf/httpd.conf", qw(ocs-update)); |
8 |
+templates2events("/etc/httpd/conf/httpd.conf", $event); |
9 |
templates2events("/etc/my.cnf", $event); |
10 |
templates2events("/etc/ocsinventory/ocsinventory-reports/dbconfig.inc.php", qw(ocs-update bootstrap-console-save)); |
11 |
templates2events("/etc/e-smith/sql/init/80ocs_mysql.sql", $event); |
12 |
|
13 |
event_link("ocs-conf", $event, "10"); |
14 |
+event_link("ocs-conf", "domain-modify", "10"); |
15 |
+event_link("ocs-conf", "bootstrap-console-save", "10"); |
16 |
+ |
17 |
safe_symlink("start", "root/etc/e-smith/events/$event/services2adjust/mysql.init"); |
18 |
safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); |
19 |
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysqld"); |
20 |
--- smeserver-ocsinventory-0.1/root/etc/e-smith/events/actions/ocs-conf.cert_change 2009-03-25 13:41:52.000000000 +0100 |
21 |
+++ smeserver-ocsinventory-0.1/root/etc/e-smith/events/actions/ocs-conf 2009-03-25 13:47:34.000000000 +0100 |
22 |
@@ -9,8 +9,15 @@ |
23 |
SRVNAME=$(/sbin/e-smith/db configuration get SystemName) |
24 |
# Copying SME's certificate into cacert.pem if the file do not exist |
25 |
# This file is used by deployment function |
26 |
+ |
27 |
if [ ! -e /home/e-smith/ssl.crt/cacert.pem ]; then |
28 |
cp /home/e-smith/ssl.crt/$SRVNAME.$DOMAIN.crt /home/e-smith/ssl.crt/cacert.pem |
29 |
+else |
30 |
+ CACERTMD5=$(md5sum /home/e-smith/ssl.crt/cacert.pem) |
31 |
+ SMECERTMD5=$(md5sum /home/e-smith/ssl.crt/$SRVNAME.$DOMAIN.crt) |
32 |
+ if [ "$CACERTMD5" != "$SMECERTMD5" ]; then |
33 |
+ # Certificate has changed, update cacert.pem |
34 |
+ cat /home/e-smith/ssl.crt/$SRVNAME.$DOMAIN.crt > /home/e-smith/ssl.crt/cacert.pem |
35 |
+ fi |
36 |
fi |
37 |
|
38 |
- |