Compare commits
6 Commits
1e2f36d7a1
...
c93f4581c4
Author | SHA1 | Date |
---|---|---|
Tobias Herre | c93f4581c4 | |
Tobias Herre | bef3642f49 | |
Tobias Herre | 0589fb8997 | |
Tobias Herre | e2517d06f6 | |
Tobias Herre | 9b76402251 | |
Tobias Herre | f71d485b13 |
|
@ -275,7 +275,6 @@ files:
|
||||||
|
|
||||||
|
|
||||||
reports:
|
reports:
|
||||||
"LOADER: $(def.wmde_lib)/scripts/dovecot/rspamd-learn-ham.sieve.mustache";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
7
php.cf
7
php.cf
|
@ -80,19 +80,17 @@ vars:
|
||||||
"pkgs" slist => {
|
"pkgs" slist => {
|
||||||
"php$(xversion)-cli",
|
"php$(xversion)-cli",
|
||||||
"php$(xversion)-common",
|
"php$(xversion)-common",
|
||||||
"php$(xversion)-pecl-zip",
|
|
||||||
"php$(xversion)-pgsql",
|
"php$(xversion)-pgsql",
|
||||||
"php$(xversion)-mysqlnd",
|
"php$(xversion)-mysqlnd",
|
||||||
"php$(xversion)-xml",
|
"php$(xversion)-xml",
|
||||||
"php$(xversion)-gd",
|
"php$(xversion)-gd",
|
||||||
"php$(xversion)-mbstring",
|
"php$(xversion)-mbstring",
|
||||||
"php$(xversion)-intl",
|
"php$(xversion)-intl",
|
||||||
"php$(xversion)-pecl-imagick-im6",
|
|
||||||
"php$(xversion)-ldap",
|
"php$(xversion)-ldap",
|
||||||
|
"php$(xversion)-pecl-imagick-im6",
|
||||||
"php-pecl-json-post",
|
"php-pecl-json-post",
|
||||||
"php-pecl-apcu",
|
"php-pecl-apcu",
|
||||||
"php-pecl-zip",
|
"php-pecl-zip",
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -290,8 +288,9 @@ commands:
|
||||||
handle => "php_composer_installer_downloaded",
|
handle => "php_composer_installer_downloaded",
|
||||||
depends_on => {"php_dir_created"};
|
depends_on => {"php_dir_created"};
|
||||||
|
|
||||||
"$(php.cli_exe) $(installer) --install-dir=/usr/local/bin --filename=composer"
|
"export HOME=/root && $(php.cli_exe) $(installer) --install-dir=/usr/local/bin --filename=composer"
|
||||||
handle => "php_composer_installed",
|
handle => "php_composer_installed",
|
||||||
|
contain => wmde_cmd_useshell,
|
||||||
depends_on => {"php_composer_installer_downloaded"};
|
depends_on => {"php_composer_installer_downloaded"};
|
||||||
|
|
||||||
|
|
||||||
|
|
38
rspamd.cf
38
rspamd.cf
|
@ -8,6 +8,14 @@ classes:
|
||||||
"runpw" expression => isvariable("cfg[password]");
|
"runpw" expression => isvariable("cfg[password]");
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
|
"tpl_deps" slist => { "rspamd_pkgs_installed","rspamd_cfg_dir_created" };
|
||||||
|
|
||||||
|
runpw::
|
||||||
|
"tpl_deps" slist => { "rspamd_pkgs_installed","rspamd_cfg_dir_created","rspamd_password_ready" };
|
||||||
|
|
||||||
|
|
||||||
|
any::
|
||||||
|
|
||||||
"cfgfiles" slist => {
|
"cfgfiles" slist => {
|
||||||
"local.d/milter_headers.conf",
|
"local.d/milter_headers.conf",
|
||||||
# "local.d/actions.conf",
|
# "local.d/actions.conf",
|
||||||
|
@ -44,11 +52,32 @@ vars:
|
||||||
"root_group" string => "root";
|
"root_group" string => "root";
|
||||||
"rspamadm" string => "/usr//bin/rspamadm";
|
"rspamadm" string => "/usr//bin/rspamadm";
|
||||||
|
|
||||||
any::
|
runpw::
|
||||||
"password" string => execresult("$(rspamadm) pw -p $(cfg[password])","noshell");
|
|
||||||
|
|
||||||
|
"password" string => readfile("$(sys.workdir)/data/agent/rspamd/password-hash.txt"),
|
||||||
|
handle => "rspamd_password_ready",
|
||||||
|
depends_on => {"rspamd_password_hash_created"};
|
||||||
|
|
||||||
|
files:
|
||||||
|
runpw::
|
||||||
|
"$(sys.workdir)/data/agent/rspamd/password.txt"
|
||||||
|
create => "true",
|
||||||
|
content => "$(cfg[password])",
|
||||||
|
handle => "rspamd_password_created",
|
||||||
|
classes => if_repaired("rspamd_password_repaired");
|
||||||
|
|
||||||
|
rspamd_password_repaired::
|
||||||
|
"$(sys.workdir)/data/agent/rspamd/password-hash.txt"
|
||||||
|
content => execresult("$(rspamadm) pw -p $(cfg[password])","noshell"),
|
||||||
|
depends_on => {"rspamd_password_created"},
|
||||||
|
handle => "rspamd_password_hash_created";
|
||||||
|
|
||||||
|
commands:
|
||||||
|
!rspamd_password_repaired::
|
||||||
|
"/usr/bin/true"
|
||||||
|
depends_on => {"rspamd_password_created"},
|
||||||
|
handle => "rspamd_password_hash_created",
|
||||||
|
inform => "false";
|
||||||
|
|
||||||
methods:
|
methods:
|
||||||
"any" usebundle => install_rspamd_pkgs;
|
"any" usebundle => install_rspamd_pkgs;
|
||||||
|
@ -67,16 +96,13 @@ files:
|
||||||
template_method => "mustache",
|
template_method => "mustache",
|
||||||
perms => m("644"),
|
perms => m("644"),
|
||||||
template_data => bundlestate("$(this.bundle)"),
|
template_data => bundlestate("$(this.bundle)"),
|
||||||
depends_on => { "rspamd_pkgs_installed","rspamd_cfg_dir_created" },
|
depends_on => @(tpl_deps),
|
||||||
classes => if_repaired(rspamd_repaired),
|
classes => if_repaired(rspamd_repaired),
|
||||||
handle => "rspamd_cfgs_done";
|
handle => "rspamd_cfgs_done";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
reports:
|
reports:
|
||||||
# "RSPAMD: $(cfgjs)";
|
|
||||||
# "RSJ: $(worker_normalx)";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
13
sympa.cf
13
sympa.cf
|
@ -360,7 +360,9 @@ vars:
|
||||||
|
|
||||||
methods:
|
methods:
|
||||||
"any" usebundle => sympa_create_mailname(@(cfg));
|
"any" usebundle => sympa_create_mailname(@(cfg));
|
||||||
"any" usebundle => wmde_install_packages(@(sympa.pkgs),"sympa");
|
#"any" usebundle => wmde_install_packages(@(sympa.pkgs),"sympa");
|
||||||
|
"any" usebundle => install_sympa_pkgs;
|
||||||
|
|
||||||
"any" usebundle => sympa_update_config(@(cfg));
|
"any" usebundle => sympa_update_config(@(cfg));
|
||||||
"any" usebundle => sympa_init_db(@(cfg));
|
"any" usebundle => sympa_init_db(@(cfg));
|
||||||
|
|
||||||
|
@ -379,7 +381,6 @@ methods:
|
||||||
|
|
||||||
"any" usebundle => install_sympa_domains(@(cfg[domains]),"$(cfg_dir)");
|
"any" usebundle => install_sympa_domains(@(cfg[domains]),"$(cfg_dir)");
|
||||||
reports:
|
reports:
|
||||||
"ETC: $(cfg_dir) - $(cfg[settings][etc])";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -596,3 +597,11 @@ reports:
|
||||||
"SYMPA DOES NOT RUN BACKUP";
|
"SYMPA DOES NOT RUN BACKUP";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bundle agent install_sympa_pkgs
|
||||||
|
{
|
||||||
|
methods:
|
||||||
|
"any" usebundle => wmde_install_packages(@(sympa.pkgs),"sympa");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ password_query = \
|
||||||
iterate_query = SELECT username AS user FROM mailbox
|
iterate_query = SELECT username AS user FROM mailbox
|
||||||
|
|
||||||
user_query = \
|
user_query = \
|
||||||
SELECT 'maildir:~/Maildir' as mail, '{{vars.dovecot_vimbadmin_sql.dovecot_cfg.vmail_dir}}/%d/%n' as home, 1003 as gid, 1003 as uid FROM mailbox WHERE username = '%u'
|
SELECT 'maildir:~/Maildir' as mail, '{{vars.dovecot_vimbadmin_sql.dovecot_cfg.vmail_dir}}/%d/%n' as home, {{vars.dovecot_vimbadmin_sql.dovecot_cfg.vmail_uid}} as gid, {{vars.dovecot_vimbadmin_sql.dovecot_cfg.vmail_gid}} as uid FROM mailbox WHERE username = '%u'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ commands:
|
||||||
|
|
||||||
"/bin/sh"
|
"/bin/sh"
|
||||||
# args => "-c 'cd $(cfg[install_dir]) && $(php_composer.exe) -q -n create-project --prefer-dist --no-dev opensolutions/vimbadmin'",
|
# args => "-c 'cd $(cfg[install_dir]) && $(php_composer.exe) -q -n create-project --prefer-dist --no-dev opensolutions/vimbadmin'",
|
||||||
args => "-c 'cd $(cfg[install_dir]) && $(php_composer.exe) update -q --no-cache && $(php_composer.exe) install --no-cache -q --prefer-dist --no-dev",
|
args => "-c 'export HOME=$(cfg[install_dir]) && cd $(cfg[install_dir]) && $(php_composer.exe) update -q --no-cache && $(php_composer.exe) install --no-cache -q --prefer-dist --no-dev'",
|
||||||
handle => "vimbadmin_composed",
|
handle => "vimbadmin_composed",
|
||||||
depends_on => {
|
depends_on => {
|
||||||
"vimbadmin_pkgs_installed"
|
"vimbadmin_pkgs_installed"
|
||||||
|
@ -160,4 +160,6 @@ body contain vimbadmin_cmd
|
||||||
|
|
||||||
exec_owner => "$(apache.www_user)";
|
exec_owner => "$(apache.www_user)";
|
||||||
exec_group => "$(apache.www_group)";
|
exec_group => "$(apache.www_group)";
|
||||||
|
useshell=>"useshell";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue