smeserver-cacti/root/etc/e-smith/events/actions/cacti-conf

17 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

#!/bin/bash
#easy configuration of what is needed for cacti to work correctly
something=0;
psomething=0;
#check if something already set, if not let's do it
/sbin/e-smith/config getprop mariadb TmpTableSize 1>/dev/null || ( config setprop mariadb TmpTableSize 32M ; echo "setting mariadb TmpTableSize 32M" ; something=1)
/sbin/e-smith/config getprop mariadb MaxHeapTableSize 1>/dev/null || ( config setprop mariadb MaxHeapTableSize 32M ; echo "setting mariadb MaxHeapTableSize 32M" ; something=1)
/sbin/e-smith/config getprop mariadb JoinBufferSize 1>/dev/null || ( config setprop mariadb JoinBufferSize 62M ; echo "setting mariadb JoinBufferSize 62M" ; something=1)
#/sbin/e-smith/config getprop php74 MemoryLimit 1>/dev/null || ( config setprop php74 MemoryLimit 800M ; echo "setting php74 memory_limit 800M" ; psomething=1)
# install detect cli for php not php74 even if $php_path is set
#[ $something == 1 ] && /sbin/e-smith/expand-template /etc/my.cnf
#[ $psomething == 1 ] && /usr/sbin/e-smith/expand-template /etc/opt/remi/php74/php.ini && /usr/bin/systemctl restart php74-php-fpm.service