/[smecontribs]/rpms/smeserver-cacti/contribs10/smeserver-cacti-1.1.19-sme10.patch
ViewVC logotype

Diff of /rpms/smeserver-cacti/contribs10/smeserver-cacti-1.1.19-sme10.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.9 by jpp, Wed Jul 27 21:43:39 2022 UTC Revision 1.16 by jpp, Thu Jul 28 04:06:13 2022 UTC
# Line 9  diff -Nur --no-dereference smeserver-cac Line 9  diff -Nur --no-dereference smeserver-cac
9          ))          ))
10   {   {
11       templates2events("/etc/cacti/db.php", $event);       templates2events("/etc/cacti/db.php", $event);
12  @@ -22,3 +23,34 @@  @@ -22,3 +23,35 @@
13   }   }
14    
15   templates2events("/etc/e-smith/sql/init/80cacti", "post-upgrade");   templates2events("/etc/e-smith/sql/init/80cacti", "post-upgrade");
# Line 34  diff -Nur --no-dereference smeserver-cac Line 34  diff -Nur --no-dereference smeserver-cac
34  +  +
35  +event_actions($event,  +event_actions($event,
36  +'cacti-conf' => '2',  +'cacti-conf' => '2',
37    +'cacti-install' => '94',
38  +'cacti-ldap' => '95'  +'cacti-ldap' => '95'
39  +);  +);
40  +  +
# Line 574  diff -Nur --no-dereference smeserver-cac Line 575  diff -Nur --no-dereference smeserver-cac
575  +innodb_buffer_pool_size=483M  +innodb_buffer_pool_size=483M
576  +innodb_additional_mem_pool_size=80M  +innodb_additional_mem_pool_size=80M
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
579    --- 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-28 00:00:45.319000000 -0400
581    @@ -0,0 +1,17 @@
582    +#!/bin/bash
583    +
584    +# move to cli dir
585    +cd /usr/share/cacti/cli
586    +
587    +#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 &
589    +pids=$! ; wait $pid;
590    +
591    +
592    +#TODO:
593    +#--automationmode
594    +#--automationrange with LAN if server-gateway; or only interface if server only
595    +#--lang (using an array between cacti option and system language)
596    +# using this to set ldap ? --ldap:dn:...
597    +# do we need a --mode=upgrade and a --mode=install
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
600    --- 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:58:46.807000000 -0400
602    @@ -19,24 +19,25 @@
603     #ldap_group_require    'on' or ''
604     # then set our admin password
605     /usr/bin/mysql <<EOF
606    -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';
608    +REPLACE INTO ${db}.settings VALUES ('ldap_group_attrib','memberUid') ;
609    +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';
612    -UPDATE ${db}.settings SET value='3' WHERE name='ldap_version';
613    -UPDATE ${db}.settings SET value='localhost' WHERE name='ldap_server';
614    -UPDATE ${db}.settings SET value='objectClass=inetOrgPerson' WHERE name='ldap_search_filter';
615    -UPDATE ${db}.settings SET value='ou=Users,$DN' WHERE name='ldap_search_base';
616    -UPDATE ${db}.settings SET value='0' WHERE name='ldap_referrals';
617    -UPDATE ${db}.settings SET value='636' WHERE name='ldap_port_ssl';
618    -UPDATE ${db}.settings SET value='389' WHERE name='ldap_port';
619    -UPDATE ${db}.settings SET value='0' WHERE name='ldap_mode';
620    -UPDATE ${db}.settings SET value='0' WHERE name='ldap_encryption';
621    -UPDATE ${db}.settings SET value='uid=<username>,ou=Users,$DN' WHERE name='ldap_dn';
622    -UPDATE ${db}.settings SET value='3' WHERE name='auth_method';
623    -UPDATE ${db}.settings SET value='cn' WHERE name='cn_full_name';
624    -UPDATE ${db}.settings SET value='mail' WHERE name='cn_email';
625    +REPLACE INTO ${db}.settings VALUES ('ldap_tls_certificate','0') ;
626    +REPLACE INTO ${db}.settings VALUES ('ldap_version','3') ;
627    +REPLACE INTO ${db}.settings VALUES ('ldap_server','localhost') ;
628    +REPLACE INTO ${db}.settings VALUES ('ldap_search_filter','objectClass=inetOrgPerson') ;
629    +REPLACE INTO ${db}.settings VALUES ('ldap_search_base','ou=Users,$DN') ;
630    +REPLACE INTO ${db}.settings VALUES ('ldap_referrals','0') ;
631    +REPLACE INTO ${db}.settings VALUES ('ldap_port_ssl','636') ;
632    +REPLACE INTO ${db}.settings VALUES ('ldap_port','389') ;
633    +REPLACE INTO ${db}.settings VALUES ('ldap_mode','0') ;
634    +REPLACE INTO ${db}.settings VALUES ('ldap_encryption','0') ;
635    +REPLACE INTO ${db}.settings VALUES ('ldap_dn','uid=<username>,ou=Users,$DN') ;
636    +REPLACE INTO ${db}.settings VALUES ('auth_method','3') ;
637    +REPLACE INTO ${db}.settings VALUES ('cn_full_name','cn') ;
638    +REPLACE INTO ${db}.settings VALUES ('cn_email','mail') ;
639    
640    +REPLACE INTO ${db}.settings VALUES ('user_template','3');
641    
642     # 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';


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed