Compare commits

...

5 Commits

Author SHA1 Message Date
Tube b962c1452a Php 8.1 for CentOS 2023-11-14 19:47:58 +01:00
Tube a7d4d8925d Conditional mysql/mariadb 2023-11-14 19:47:25 +01:00
Tube ffbda7abbb Set mariadb to fals for FreeBSD 2023-11-14 19:46:47 +01:00
Tube 236965e497 Bundle to create bind mounts 2023-11-14 19:45:58 +01:00
Tube a1d3d87602 Added mod_remoteip for CentoOS 2023-11-14 19:45:23 +01:00
5 changed files with 40 additions and 6 deletions

View File

@ -77,6 +77,7 @@ vars:
{m: "unixd",f:"mod_unixd"},
{m: "ssl",f:"mod_ssl"},
{m:"proxy",f:"mod_proxy"},
{m:"proxy_fcgi",f:"mod_proxy_fcgi"},
{m:"proxy_http",f:"mod_proxy_http"},
{m:"proxy_http2",f:"mod_proxy_http2"},
{m:"remoteip",f:"mod_remoteip"}
@ -152,7 +153,8 @@ vars:
{m: "log_config",f:"mod_log_config"},
{m: "version",f:"mod_version"},
{m: "unixd",f:"mod_unixd"},
{m: "systemd",f:"mod_systemd"}
{m: "systemd",f:"mod_systemd"},
]';
# {m: "php",f:"libphp8"},
centos::
@ -167,6 +169,7 @@ vars:
{m: "unixd",f:"mod_unixd"},
{m: "systemd",f:"mod_systemd"},
{m:"ssl",f:"mod_ssl"},
{m: "remoteip",f:"mod_remoteip"}
]';

24
lib.cf
View File

@ -369,3 +369,27 @@ reports:
}
bundle edit_line bind_mount(src,dst)
{
insert_lines:
freebsd::
"$(src) $(dst) nullfs rw,late 0 0";
centos::
"$(src) $(dst) none defaults,bind 0 0";
}
bundle agent bind_mount(src,dst)
{
files:
"/etc/fstab"
edit_line => bind_mount("$(src)","$(dst)"),
classes => if_repaired(bind_mount_fstab_changed);
commands:
bind_mount_fstab_changed::
"echo '$(src)$(dst)' > /dev/null && mount"
contain=>wmde_cmd_useshell,
args => "-a";
}

View File

@ -79,7 +79,7 @@ vars:
"default-authentication-plugin":"mysql_native_password"
}
},
"mariadb":false,
"bind_address":"$(cfg[db_host])",
"backup_dir":"/tank/backups/mysql_backups"
}';

View File

@ -10,17 +10,20 @@ vars:
"bind_address":"127.0.0.1",
"user":"mysql",
"port":"3306",
"backup_dir":"/var/backups"
"backup_dir":"/var/backups",
"mariadb":true
}';
"cfg" data => mergedata(@(default_cfg),@(cfg_param));
freebsd::
"user" string => "mysql";
# "server_pkgs" slist => {"mariadb106-server"};
# "client_pkgs" slist => {"mariadb106-client"};
"server_pkgs" slist => {"mysql80-server"};
"client_pkgs" slist => {"mysql80-client"};
"server_pkgs" slist => {"mariadb106-server"}, if => strcmp("$(cfg[mariadb])","true");
"client_pkgs" slist => {"mariadb106-client"}, if => strcmp("$(cfg[mariadb])","true");
"type" string => "mysql8";
"service_name" string => "mysql-server";
"cfg_dir" string => "/usr/local/etc/mysql";
@ -373,6 +376,7 @@ $(cron) root $(table_exists_cmd) && $(backup_cmd)
bundle agent create_mysql_db(cfg)
{
classes:
"type_$(mysql.type)" ;
# "do_restore" expression => isvariable("cfg[restore]");
"do_restore" expression => strcmp("$(cfg[db_restore])","true");
@ -384,6 +388,8 @@ vars:
"db_pass" string => "$(cfg[db_pass])";
"args" string => "pnunf";
type_mariadb::
"args" string => "-e \"CREATE DATABASE IF NOT EXISTS $(db_name); GRANT ALL PRIVILEGES ON $(db_name).* TO '$(db_user)'@'$(host)' IDENTIFIED BY '$(db_pass)'; \" ";

3
php.cf
View File

@ -96,6 +96,7 @@ vars:
"php-pecl-json-post",
"php-pecl-apcu",
"php-pecl-zip",
"php$(xversion)-process"
};
@ -226,7 +227,7 @@ vars:
centos::
"cli_exe" string => "/usr/bin/php";
"version" string => "8.0";
"version" string => "8.1";
"fpm_pkgs" slist => { "php-fpm" };
"fpm_service_name" string => "php$(version)-fpm";
"fpm_socket" string => "/run/php-fpm/www.sock";