|
diff -Nur --no-dereference smeserver-cacti-1.1.19.old/createlinks smeserver-cacti-1.1.19/createlinks |
|
|
--- smeserver-cacti-1.1.19.old/createlinks 2014-06-16 11:53:01.000000000 -0400 |
|
|
+++ smeserver-cacti-1.1.19/createlinks 2022-07-26 00:15:21.267000000 -0400 |
|
|
@@ -5,6 +5,7 @@ |
|
|
for my $event (qw( |
|
|
post-upgrade |
|
|
bootstrap-console-save |
|
|
+ console-save |
|
|
)) |
|
|
{ |
|
|
templates2events("/etc/cacti/db.php", $event); |
|
|
@@ -22,3 +23,26 @@ |
|
|
} |
|
|
|
|
|
templates2events("/etc/e-smith/sql/init/80cacti", "post-upgrade"); |
|
|
+ |
|
|
+my $event="smeserver-cacti-update"; |
|
|
+event_templates($event, qw( |
|
|
+ /etc/cacti/db.php |
|
|
+ /etc/httpd/conf/httpd.conf |
|
|
+ /etc/crontab |
|
|
+ /etc/opt/remi/php74/php-fpm.d/www.conf |
|
|
+ /etc/e-smith/sql/init/80cacti |
|
|
+)); |
|
|
+ |
|
|
+event_services($event, |
|
|
+ 'crond' => 'restart', |
|
|
+ 'mysql.init' => 'restart', |
|
|
+ 'httpd-e-smith' => 'sigusr1', |
|
|
+ 'php74-php-fpm' => 'reload-or-restart' |
|
|
+); |
|
|
+ |
|
|
+#backup ? |
|
|
+#use esmith::Build::Backup qw(:all); |
|
|
+#backup_includes("smeserver-cacti", qw( |
|
|
+# |
|
|
+#)); |
|
|
+ |
|
|
diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/db/configuration/migrate/80cacti smeserver-cacti-1.1.19/root/etc/e-smith/db/configuration/migrate/80cacti |
|
|
--- smeserver-cacti-1.1.19.old/root/etc/e-smith/db/configuration/migrate/80cacti 1969-12-31 19:00:00.000000000 -0500 |
|
|
+++ smeserver-cacti-1.1.19/root/etc/e-smith/db/configuration/migrate/80cacti 2022-07-26 00:51:52.311000000 -0400 |
|
|
@@ -0,0 +1,45 @@ |
|
|
+{ |
|
|
+ use MIME::Base64 qw(encode_base64); |
|
|
+ |
|
|
+ my $service; |
|
|
+ my $rec; |
|
|
+ my $pw; |
|
|
+ |
|
|
+ # Store the cacti password in the configuration database (if not already there) |
|
|
+ $service = 'cacti'; |
|
|
+ |
|
|
+ $rec = $DB->get($service) || $DB->new_record($service, {type => 'service'}); |
|
|
+ |
|
|
+ $pw = $rec->prop('DbPassword'); |
|
|
+ |
|
|
+ |
|
|
+ if (! $pw) |
|
|
+ { |
|
|
+ |
|
|
+ if ( open( RANDOM, "/dev/urandom" ) ) |
|
|
+ { |
|
|
+ my $buf; |
|
|
+ # 57 bytes is a full line of Base64 coding, and contains |
|
|
+ # 456 bits of randomness - given a perfectly random /dev/random |
|
|
+ if ( read( RANDOM, $buf, 57 ) != 57 ) |
|
|
+ { |
|
|
+ warn("Short read from /dev/random: $!"); |
|
|
+ } |
|
|
+ else |
|
|
+ { |
|
|
+ $pw = encode_base64($buf); |
|
|
+ chomp $pw; |
|
|
+ } |
|
|
+ close RANDOM; |
|
|
+ } |
|
|
+ else |
|
|
+ { |
|
|
+ warn "Could not open /dev/urandom: $!"; |
|
|
+ } |
|
|
+ |
|
|
+ $rec->set_prop('DbPassword', $pw); |
|
|
+ } |
|
|
+ |
|
|
+ |
|
|
+ |
|
|
+} |
|
1 |
diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15cacti smeserver-cacti-1.1.19/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15cacti |
diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15cacti smeserver-cacti-1.1.19/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15cacti |
2 |
--- smeserver-cacti-1.1.19.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15cacti 1969-12-31 19:00:00.000000000 -0500 |
--- smeserver-cacti-1.1.19.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15cacti 1969-12-31 19:00:00.000000000 -0500 |
3 |
+++ smeserver-cacti-1.1.19/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15cacti 2022-07-26 00:03:45.335000000 -0400 |
+++ smeserver-cacti-1.1.19/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15cacti 2022-07-26 00:03:45.335000000 -0400 |