276 lines
8.2 KiB
Plaintext
276 lines
8.2 KiB
Plaintext
|
#!/usr/bin/perl -w
|
||
|
|
||
|
use esmith::Build::CreateLinks qw(:all);
|
||
|
|
||
|
# conf-horde
|
||
|
|
||
|
foreach (qw(conf.php hooks.local.php mime_drivers.local.php prefs.local.php registry.local.php))
|
||
|
{
|
||
|
templates2events("/usr/share/horde/config/$_", qw(
|
||
|
bootstrap-console-save
|
||
|
console-save
|
||
|
email-update
|
||
|
smeserver-horde-update
|
||
|
));
|
||
|
}
|
||
|
|
||
|
foreach (qw(conf.php hooks.local.php mime_drivers.local.php prefs.local.php registry.local.php))
|
||
|
{
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-begin-php",
|
||
|
"root/etc/e-smith/templates//usr/share/horde/config/$_/template-begin");
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-end-php",
|
||
|
"root/etc/e-smith/templates//usr/share/horde/config/$_/template-end");
|
||
|
}
|
||
|
|
||
|
# conf-imp
|
||
|
|
||
|
foreach (qw( backends.local.php conf.php mime_drivers.local.php prefs.local.php))
|
||
|
{
|
||
|
templates2events("/usr/share/horde/imp/config/$_",
|
||
|
qw(
|
||
|
bootstrap-console-save
|
||
|
email-update
|
||
|
smeserver-horde-update
|
||
|
));
|
||
|
}
|
||
|
|
||
|
foreach (qw( backends.local.php conf.php mime_drivers.local.php prefs.local.php))
|
||
|
{
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-begin-php",
|
||
|
"root/etc/e-smith/templates/usr/share/horde/imp/config/$_/template-begin");
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-end-php",
|
||
|
"root/etc/e-smith/templates/usr/share/horde/imp/config/$_/template-end");
|
||
|
}
|
||
|
|
||
|
# conf-ingo
|
||
|
|
||
|
foreach (qw(backends.local.php conf.php))
|
||
|
{
|
||
|
templates2events("/usr/share/horde/ingo/config/$_",
|
||
|
qw(
|
||
|
bootstrap-console-save
|
||
|
email-update
|
||
|
smeserver-horde-update
|
||
|
));
|
||
|
}
|
||
|
|
||
|
|
||
|
foreach (qw(backends.local.php conf.php))
|
||
|
{
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-begin-php",
|
||
|
"root/etc/e-smith/templates/usr/share/horde/ingo/config/$_/template-begin");
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-end-php",
|
||
|
"root/etc/e-smith/templates/usr/share/horde/ingo/config/$_/template-end");
|
||
|
}
|
||
|
|
||
|
#conf-kronolith
|
||
|
|
||
|
foreach (qw(conf.php))
|
||
|
{
|
||
|
templates2events("/usr/share/horde/kronolith/config/$_",
|
||
|
qw(email-update bootstrap-console-save smeserver-horde-update));
|
||
|
}
|
||
|
|
||
|
foreach (qw(conf.php))
|
||
|
{
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-begin-php",
|
||
|
"root/etc/e-smith/templates/usr/share/horde/kronolith/config/$_/template-begin");
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-end-php",
|
||
|
"root/etc/e-smith/templates/usr/share/horde/kronolith/config/$_/template-end");
|
||
|
}
|
||
|
|
||
|
#conf-mnemo
|
||
|
|
||
|
foreach (qw(conf.php))
|
||
|
{
|
||
|
templates2events("/usr/share/horde/mnemo/config/$_",
|
||
|
qw(email-update bootstrap-console-save smeserver-horde-update));
|
||
|
}
|
||
|
|
||
|
foreach (qw(conf.php))
|
||
|
{
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-begin-php",
|
||
|
"root/etc/e-smith/templates/usr/share/horde/mnemo/config/$_/template-begin");
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-end-php",
|
||
|
"root/etc/e-smith/templates/usr/share/horde/mnemo/config/$_/template-end");
|
||
|
}
|
||
|
|
||
|
#conf-nag
|
||
|
|
||
|
foreach (qw(conf.php))
|
||
|
{
|
||
|
templates2events("/usr/share/horde/nag/config/$_",
|
||
|
qw(email-update bootstrap-console-save smeserver-horde-update));
|
||
|
}
|
||
|
|
||
|
foreach (qw(conf.php))
|
||
|
{
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-begin-php",
|
||
|
"root/etc/e-smith/templates//usr/share/horde/nag/config/$_/template-begin");
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-end-php",
|
||
|
"root/etc/e-smith/templates/usr/share/horde/nag/config/$_/template-end");
|
||
|
}
|
||
|
|
||
|
# conf-turba
|
||
|
foreach (qw(attributes.local.php backends.local.php conf.php))
|
||
|
{
|
||
|
templates2events("/usr/share/horde/turba/config/$_",
|
||
|
qw(email-update bootstrap-console-save smeserver-horde-update));
|
||
|
}
|
||
|
|
||
|
foreach (qw(attributes.local.php backends.local.php conf.php))
|
||
|
{
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-begin-php",
|
||
|
"root/etc/e-smith/templates//usr/share/horde/turba/config/$_/template-begin");
|
||
|
safe_symlink("/etc/e-smith/templates-default/template-end-php",
|
||
|
"root/etc/e-smith/templates//usr/share/horde/turba/config/$_/template-end");
|
||
|
}
|
||
|
|
||
|
#--------------------------------------------------
|
||
|
# actions for post-install event
|
||
|
#--------------------------------------------------
|
||
|
|
||
|
$event = "post-install";
|
||
|
|
||
|
templates2events(
|
||
|
"/usr/share/horde/smeserver/mysql_set_horde_password.sql",
|
||
|
$event);
|
||
|
|
||
|
foreach (qw(
|
||
|
20mysql_migrate_horde
|
||
|
21horde.mysql_set_password
|
||
|
25horde_mysql_create_db
|
||
|
30horde_mysql_update_privs
|
||
|
31horde_mysql_create_tables
|
||
|
32turba_mysql_create_objects
|
||
|
80kronolith_db_upgrade
|
||
|
85kronolith_utc_upgrade
|
||
|
99Ingo_Datatree_to_SQL
|
||
|
99Kronolith_Datatree_to_SQL
|
||
|
99Mnemo_Datatree_to_SQL
|
||
|
99Nag_Datatree_to_SQL
|
||
|
99Turba_Datatree_to_SQL
|
||
|
))
|
||
|
{
|
||
|
templates2events("/etc/e-smith/sql/init/$_", $event);
|
||
|
}
|
||
|
|
||
|
#--------------------------------------------------
|
||
|
# actions for post-upgrade event
|
||
|
#--------------------------------------------------
|
||
|
|
||
|
$event = "post-upgrade";
|
||
|
|
||
|
templates2events(
|
||
|
"/usr/share/horde/smeserver/mysql_set_horde_password.sql",
|
||
|
$event);
|
||
|
foreach (qw(
|
||
|
20mysql_migrate_horde
|
||
|
21horde.mysql_set_password
|
||
|
25horde_mysql_create_db
|
||
|
30horde_mysql_update_privs
|
||
|
31horde_mysql_create_tables
|
||
|
32turba_mysql_create_objects
|
||
|
80kronolith_db_upgrade
|
||
|
85kronolith_utc_upgrade
|
||
|
99Ingo_Datatree_to_SQL
|
||
|
99Kronolith_Datatree_to_SQL
|
||
|
99Mnemo_Datatree_to_SQL
|
||
|
99Nag_Datatree_to_SQL
|
||
|
99Turba_Datatree_to_SQL
|
||
|
))
|
||
|
{
|
||
|
templates2events("/etc/e-smith/sql/init/$_", $event);
|
||
|
}
|
||
|
|
||
|
event_link("conf-horde-cache", $event, "99");
|
||
|
|
||
|
#--------------------------------------------------
|
||
|
# actions for smeserver-horde-update event
|
||
|
#--------------------------------------------------
|
||
|
|
||
|
$event = "smeserver-horde-update";
|
||
|
|
||
|
templates2events(
|
||
|
"/usr/share/horde/smeserver/mysql_set_horde_password.sql",
|
||
|
$event);
|
||
|
foreach (qw(
|
||
|
20mysql_migrate_horde
|
||
|
21horde.mysql_set_password
|
||
|
25horde_mysql_create_db
|
||
|
30horde_mysql_update_privs
|
||
|
31horde_mysql_create_tables
|
||
|
32turba_mysql_create_objects
|
||
|
80kronolith_db_upgrade
|
||
|
85kronolith_utc_upgrade
|
||
|
99Ingo_Datatree_to_SQL
|
||
|
99Kronolith_Datatree_to_SQL
|
||
|
99Mnemo_Datatree_to_SQL
|
||
|
99Nag_Datatree_to_SQL
|
||
|
99Turba_Datatree_to_SQL
|
||
|
))
|
||
|
{
|
||
|
templates2events("/etc/e-smith/sql/init/$_", $event);
|
||
|
}
|
||
|
|
||
|
event_link("conf-horde-cache", $event, "99");
|
||
|
|
||
|
templates2events(
|
||
|
"/etc/httpd/conf/httpd.conf",
|
||
|
$event);
|
||
|
|
||
|
foreach $service ( qw(php-fpm php55-php-fpm php56-php-fpm php70-php-fpm php71-php-fpm php72-php-fpm php73-php-fpm php74-php-fpm) ){
|
||
|
safe_symlink("reload-or-restart", "root/etc/e-smith/events/".($event, qw(email-update) )."/services2adjust/$service");
|
||
|
}
|
||
|
|
||
|
foreach $service ( qw(70 71 72 73 74 )) {
|
||
|
templates2events("/etc/opt/remi/php$service/php-fpm.d/www.conf", qw( email-update
|
||
|
smeserver-horde-update));
|
||
|
}
|
||
|
foreach $service ( qw(55 56)) {
|
||
|
templates2events("/opt/remi/php$service/root/etc/php-fpm.d/www.conf", qw( email-update
|
||
|
smeserver-horde-update));
|
||
|
}
|
||
|
|
||
|
templates2events("/etc/php-fpm.d/www.conf", qw( email-update
|
||
|
smeserver-horde-update));
|
||
|
|
||
|
foreach $service ( qw(httpd-e-smith) ){
|
||
|
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/$service");
|
||
|
}
|
||
|
foreach $service ( qw(mysql.init) ){
|
||
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/$service");
|
||
|
}
|
||
|
|
||
|
|
||
|
#---------------------------------------------------------
|
||
|
# actions for email-update event if horde cache is enabled
|
||
|
#---------------------------------------------------------
|
||
|
$event = "email-update";
|
||
|
|
||
|
event_link("conf-horde-cache", $event, "99");
|
||
|
|
||
|
#--------------------------------------------------------------
|
||
|
# actions for user-delete event if horde RemoveUsers is enabled
|
||
|
#--------------------------------------------------------------
|
||
|
$event = "user-delete";
|
||
|
|
||
|
event_link("smeserver-horde-data-delete", $event, "90");
|
||
|
|
||
|
#--------------------------------------------------
|
||
|
# action for user-create event
|
||
|
#--------------------------------------------------
|
||
|
|
||
|
$event = "user-create";
|
||
|
|
||
|
event_link("ldap-add-fburl", $event, "30");
|
||
|
|
||
|
#--------------------------------------------------
|
||
|
# action for ldaup-update event
|
||
|
#--------------------------------------------------
|
||
|
|
||
|
$event = "ldap-update";
|
||
|
|
||
|
event_link("ldap-add-fburl", $event, "85");
|
||
|
|