577 |
+innodb_flush_log_at_trx_commit=2 |
+innodb_flush_log_at_trx_commit=2 |
578 |
diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/events/actions/cacti-install smeserver-cacti-1.1.19/root/etc/e-smith/events/actions/cacti-install |
diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/events/actions/cacti-install smeserver-cacti-1.1.19/root/etc/e-smith/events/actions/cacti-install |
579 |
--- smeserver-cacti-1.1.19.old/root/etc/e-smith/events/actions/cacti-install 1969-12-31 19:00:00.000000000 -0500 |
--- smeserver-cacti-1.1.19.old/root/etc/e-smith/events/actions/cacti-install 1969-12-31 19:00:00.000000000 -0500 |
580 |
+++ smeserver-cacti-1.1.19/root/etc/e-smith/events/actions/cacti-install 2022-07-27 23:05:44.866000000 -0400 |
+++ smeserver-cacti-1.1.19/root/etc/e-smith/events/actions/cacti-install 2022-07-28 00:00:45.319000000 -0400 |
581 |
@@ -0,0 +1,15 @@ |
@@ -0,0 +1,17 @@ |
582 |
+#!/bin/bash |
+#!/bin/bash |
583 |
+ |
+ |
584 |
+# move to cli dir |
+# move to cli dir |
585 |
+cd /usr/share/cacti/cli |
+cd /usr/share/cacti/cli |
586 |
+ |
+ |
587 |
+#install |
+#install, we put away, it seems that inside the event it just do not work |
588 |
+/usr/bin/php74 install_cacti.php --accept-eula --install --path=php_binary:/usr/bin/php74 |
+/usr/bin/php74 install_cacti.php --accept-eula --install --path=php_binary:/usr/bin/php74 & |
589 |
|
+pids=$! ; wait $pid; |
590 |
|
+ |
591 |
+ |
+ |
592 |
+#TODO: |
+#TODO: |
593 |
+#--automationmode |
+#--automationmode |
598 |
+ |
+ |
599 |
diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/events/actions/cacti-ldap smeserver-cacti-1.1.19/root/etc/e-smith/events/actions/cacti-ldap |
diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/events/actions/cacti-ldap smeserver-cacti-1.1.19/root/etc/e-smith/events/actions/cacti-ldap |
600 |
--- smeserver-cacti-1.1.19.old/root/etc/e-smith/events/actions/cacti-ldap 2022-07-27 22:43:12.847000000 -0400 |
--- smeserver-cacti-1.1.19.old/root/etc/e-smith/events/actions/cacti-ldap 2022-07-27 22:43:12.847000000 -0400 |
601 |
+++ smeserver-cacti-1.1.19/root/etc/e-smith/events/actions/cacti-ldap 2022-07-27 23:05:44.637000000 -0400 |
+++ smeserver-cacti-1.1.19/root/etc/e-smith/events/actions/cacti-ldap 2022-07-27 23:58:46.807000000 -0400 |
602 |
@@ -19,24 +19,25 @@ |
@@ -19,24 +19,25 @@ |
603 |
#ldap_group_require 'on' or '' |
#ldap_group_require 'on' or '' |
604 |
# then set our admin password |
# then set our admin password |
605 |
/usr/bin/mysql <<EOF |
/usr/bin/mysql <<EOF |
606 |
-UPDATE ${db}.settings SET value='memberUid' WHERE name='ldap_group_attrib'; |
-UPDATE ${db}.settings SET value='memberUid' WHERE name='ldap_group_attrib'; |
607 |
-UPDATE ${db}.settings SET value='uid=cactigroup,ou=Groups,$DN' WHERE name='ldap_group_dn'; |
-UPDATE ${db}.settings SET value='uid=cactigroup,ou=Groups,$DN' WHERE name='ldap_group_dn'; |
608 |
+INSERT INTO ${db}.settings VALUES ('ldap_group_attrib','memberUid') ON DUPLICATE KEY UPDATE name='ldap_group_attrib'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_group_attrib','memberUid') ; |
609 |
+INSERT INTO ${db}.settings VALUES ('ldap_group_dn','uid=cactigroup,ou=Groups,$DN') ON DUPLICATE KEY UPDATE name='ldap_group_dn'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_group_dn','uid=cactigroup,ou=Groups,$DN') ; |
610 |
|
|
611 |
-UPDATE ${db}.settings SET value='0' WHERE name='ldap_tls_certificate'; |
-UPDATE ${db}.settings SET value='0' WHERE name='ldap_tls_certificate'; |
612 |
-UPDATE ${db}.settings SET value='3' WHERE name='ldap_version'; |
-UPDATE ${db}.settings SET value='3' WHERE name='ldap_version'; |
622 |
-UPDATE ${db}.settings SET value='3' WHERE name='auth_method'; |
-UPDATE ${db}.settings SET value='3' WHERE name='auth_method'; |
623 |
-UPDATE ${db}.settings SET value='cn' WHERE name='cn_full_name'; |
-UPDATE ${db}.settings SET value='cn' WHERE name='cn_full_name'; |
624 |
-UPDATE ${db}.settings SET value='mail' WHERE name='cn_email'; |
-UPDATE ${db}.settings SET value='mail' WHERE name='cn_email'; |
625 |
+INSERT INTO ${db}.settings VALUES ('ldap_tls_certificate','0') ON DUPLICATE KEY UPDATE name='ldap_tls_certificate'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_tls_certificate','0') ; |
626 |
+INSERT INTO ${db}.settings VALUES ('ldap_version','3') ON DUPLICATE KEY UPDATE name='ldap_version'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_version','3') ; |
627 |
+INSERT INTO ${db}.settings VALUES ('ldap_server','localhost') ON DUPLICATE KEY UPDATE name='ldap_server'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_server','localhost') ; |
628 |
+INSERT INTO ${db}.settings VALUES ('ldap_search_filter','objectClass=inetOrgPerson') ON DUPLICATE KEY UPDATE name='ldap_search_filter'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_search_filter','objectClass=inetOrgPerson') ; |
629 |
+INSERT INTO ${db}.settings VALUES ('ldap_search_base','ou=Users,$DN') ON DUPLICATE KEY UPDATE name='ldap_search_base'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_search_base','ou=Users,$DN') ; |
630 |
+INSERT INTO ${db}.settings VALUES ('ldap_referrals','0') ON DUPLICATE KEY UPDATE name='ldap_referrals'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_referrals','0') ; |
631 |
+INSERT INTO ${db}.settings VALUES ('ldap_port_ssl','636') ON DUPLICATE KEY UPDATE name='ldap_port_ssl'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_port_ssl','636') ; |
632 |
+INSERT INTO ${db}.settings VALUES ('ldap_port','389') ON DUPLICATE KEY UPDATE name='ldap_port'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_port','389') ; |
633 |
+INSERT INTO ${db}.settings VALUES ('ldap_mode','0') ON DUPLICATE KEY UPDATE name='ldap_mode'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_mode','0') ; |
634 |
+INSERT INTO ${db}.settings VALUES ('ldap_encryption','0') ON DUPLICATE KEY UPDATE name='ldap_encryption'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_encryption','0') ; |
635 |
+INSERT INTO ${db}.settings VALUES ('ldap_dn','uid=<username>,ou=Users,$DN') ON DUPLICATE KEY UPDATE name='ldap_dn'; |
+REPLACE INTO ${db}.settings VALUES ('ldap_dn','uid=<username>,ou=Users,$DN') ; |
636 |
+INSERT INTO ${db}.settings VALUES ('auth_method','3') ON DUPLICATE KEY UPDATE name='auth_method'; |
+REPLACE INTO ${db}.settings VALUES ('auth_method','3') ; |
637 |
+INSERT INTO ${db}.settings VALUES ('cn_full_name','cn') ON DUPLICATE KEY UPDATE name='cn_full_name'; |
+REPLACE INTO ${db}.settings VALUES ('cn_full_name','cn') ; |
638 |
+INSERT INTO ${db}.settings VALUES ('cn_email','mail') ON DUPLICATE KEY UPDATE name='cn_email'; |
+REPLACE INTO ${db}.settings VALUES ('cn_email','mail') ; |
639 |
|
|
640 |
+UPDATE ${db}.settings SET value='3' WHERE name='user_template' and value='0'; |
+REPLACE INTO ${db}.settings VALUES ('user_template','3'); |
641 |
|
|
642 |
# set password of admin |
# set password of admin |
643 |
UPDATE ${db}.user_auth SET email_address='admin@${domain}', must_change_password='',password=md5('$adminpass'), enabled='on' WHERE username='admin' and id='1'; |
UPDATE ${db}.user_auth SET email_address='admin@${domain}', must_change_password='',password=md5('$adminpass'), enabled='on' WHERE username='admin' and id='1'; |