Changes

Jump to navigation Jump to search
no edit summary
Line 118: Line 118:     
     templates2events("/opt/roundcube/config/db.inc.php", console-save);
 
     templates2events("/opt/roundcube/config/db.inc.php", console-save);
 +
 +
{{Note Box|msg=The settings below are new, waiting a release with the bug [[bugzilla: 8951]]}}
 +
===== event_templates =====
 +
      This function creates a file tree (of empty files) which is used by the generic_template_expand action to determine which templates need to be expanded for a particular event. Takes one event
 +
      argument and a list of file names, e.g.
 +
 +
        event_templates("$event", "/etc/some/file", "/etc/some/file2", "/etc/some/file3", ...);
 +
 +
# templates to expand
 +
for my $event (qw(
 +
conf-wordpress
 +
wordpress-update
 +
))
 +
{
 +
event_templates ($event , "/etc/httpd/conf/httpd.conf");
 +
event_templates ($event , "/etc/dar/DailyBackup.dcf");
 +
}
 +
 +
===== event_actions($event, %actions) =====
 +
      Create links to actions for the given event. %actions is a list of pairs Action => Priority. E.g
 +
 +
        event_actions('myevent', 'action1' => '10', 'action2' => '20', ..);
 +
 +
      See also event_link().
 +
 +
# actions to perform
 +
for my $event (qw(
 +
bootstrap-console-save
 +
console-save
 +
conf-wordpress
 +
wordpress-update
 +
))
 +
{
 +
event_actions ( $event , 'wordpress' => '20', 'wordpressa' => '30' , 'wordpressb' => '40');
 +
}
 +
===== event_services($event, %services) =====
 +
      Create links for the given $event in services2adjust/ subdirectory. %services is a list of pairs Service => LinkDestination
 +
          event_services(’myevent’, ’sshd’ => ’restart’, ’samba’ => ’reload’) See also safe_symlink().
 +
 +
# services to launch on event
 +
for my $event (qw(
 +
conf-wordpress
 +
wordpress-update
 +
))
 +
{
 +
event_services ( $event , "httpd-e-smith"=> 'sigusr1');
 +
event_services ( $event , "mysql.init"=> 'restart');
 +
}
    
==== AUTHOR ====
 
==== AUTHOR ====

Navigation menu