#! /usr/bin/perl -w use esmith::Build::CreateLinks qw(:all); #-------------------------------------------------- # actions for geoip-update event #-------------------------------------------------- #for my $event (qw(geoip-update)) #{ #templates2events("/var/service/qpsmtpd/config/badcountries", $event); #event_link("smeserver-geopip-download-action", $event, "10"); #} my $event = "geoip-update"; foreach (qw( /var/service/qpsmtpd/config/badcountries /etc/GeoIP.conf /etc/crontab /var/service/qpsmtpd/config/peers/0 )) { templates2events("$_", qw( geoip-update smeserver-geoip-update )); } event_link("smeserver-geopip-download-action", $event, "10"); event_link("smeserver-geopip-download-action", 'smeserver-geoip-update', "10"); #-------------------------------------------------- # actions for email-update event #-------------------------------------------------- #for my $event (qw( # bootstrap-console-save # email-update)) #{ #templates2events("/var/service/qpsmtpd/config/badcountries", $event); #} #my $event = "email-update"; foreach (qw( /var/service/qpsmtpd/config/badcountries /etc/GeoIP.conf /etc/crontab /var/service/qpsmtpd/config/peers/0 )) { templates2events("$_", qw( post-upgrade bootstrap-console-save console-save email-update )); } event_services('smeserver-geoip-update', 'qpsmtpd' => 'restart', 'sqpsmtpd' => 'restart') ; safe_symlink("../../plugins/18check_badcountries", "root//etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/18check_badcountries");