Line 50: |
Line 50: |
| event_link("yum-check-repository", "yum-update", "40"); | | event_link("yum-check-repository", "yum-update", "40"); |
| | | |
− | ==== Example : Sme8admin==== | + | ==== Example : smeserver-Sme8admin==== |
| #! /usr/bin/perl -w | | #! /usr/bin/perl -w |
| | | |
Line 69: |
Line 69: |
| event_link("sme8admin-parselog","logrotate","15"); | | event_link("sme8admin-parselog","logrotate","15"); |
| | | |
− | ==== Example : sharedfolder==== | + | ==== Example : smeserver-sharedfolder==== |
| #!/usr/bin/perl -w | | #!/usr/bin/perl -w |
| | | |
Line 136: |
Line 136: |
| templates2events("/etc/rsyncd.conf", "remoteaccess-update"); | | templates2events("/etc/rsyncd.conf", "remoteaccess-update"); |
| | | |
− | ==== Example : denyhost ==== | + | ==== Example : smeserver-denyhost ==== |
| | | |
| #!/usr/bin/perl -w | | #!/usr/bin/perl -w |
Line 155: |
Line 155: |
| | | |
| exit 0; | | exit 0; |
| + | |
| + | ==== Example : smeserver-roundcube ==== |
| + | |
| + | #!/usr/bin/perl -w |
| + | |
| + | use esmith::Build::CreateLinks qw(:all); |
| + | |
| + | for my $event (qw( |
| + | bootstrap-console-save |
| + | conf-roundcube |
| + | post-upgrade |
| + | )) |
| + | { |
| + | templates2events("/opt/roundcube/config/db.inc.php", $event); |
| + | templates2events("/opt/roundcube/config/main.inc.php", $event); |
| + | templates2events("/etc/e-smith/sql/init/80roundcube", $event); |
| + | } |
| + | |
| + | for my $event (qw( |
| + | conf-roundcube |
| + | )) |
| + | { |
| + | templates2events("/etc/httpd/conf/httpd.conf", $event); |
| + | safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");; |
| + | safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); |
| + | } |
| + | |
| + | ==== Example : smeserver-yum ==== |
| + | #!/usr/bin/perl -w |
| + | |
| + | use esmith::Build::CreateLinks qw(:all); |
| + | use File::Basename; |
| + | use File::Path; |
| + | |
| + | foreach my $file (qw(/etc/yum.conf)) |
| + | { |
| + | templates2events($file, qw(yum-modify bootstrap-console-save)); |
| + | } |
| + | |
| + | templates2events("/etc/crontab", "yum-modify"); |
| + | |
| + | for ( qw(install remove update) ) |
| + | { |
| + | event_link("yum-action", "yum-$_", "20"); |
| + | event_link("initialize-default-databases", "yum-$_", "50"); |
| + | event_link("navigation-conf", "yum-$_", "80"); |
| + | } |
| + | |
| + | for ( qw(install remove update modify) ) |
| + | { |
| + | event_link("yum-update-dbs", "yum-$_", "90"); |
| + | } |
| + | |
| + | for ( qw(bootstrap-console-save yum-update) ) |
| + | { |
| + | event_link("yum-import-keys", $_, "10"); |
| + | } |
| + | |
| + | safe_symlink("once", "root/etc/e-smith/events/local/services2adjust/yum"); |
| + | |
| + | #-------------------------------------------------- |
| + | # functions for manager panel |
| + | #-------------------------------------------------- |
| + | panel_link("yum", "manager"); |
| + | |
| + | ==== Example : smeserver-phplist ==== |
| + | #!/usr/bin/perl -w |
| + | |
| + | use esmith::Build::CreateLinks qw(:all); |
| + | |
| + | templates2events("/etc/e-smith/sql/init/phplistdb", qw/webapps-update bootstrap-console-save/); |
| + | templates2events("/etc/phplist/config.php", qw/webapps-update bootstrap-console-save/); |
| + | |
| + | safe_symlink("/var/qmail/bin/qmail-newu", "root/etc/e-smith/events/webapps-update/S55phplist-qmail-assign"); |
| + | foreach my $event (qw/webapps-update ipasserelle-update bootstrap-ldap-save/){ |
| + | event_link("phplist-create-pseudo", "$event", "55"); |
| + | } |
| + | |
| + | safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/etc/phplist/config.php/template-begin"); |
| + | safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/etc/phplist/config.php/template-end"); |
| + | |
| + | safe_symlink("/var/qmail/alias/.qmail-phplistbounces", "root/var/qmail/alias/.qmail-phplistbounces-default"); |
| + | |
| + | safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/phplist'); |
| + | safe_symlink("/var/service/phplist" , 'root/service/phplist'); |
| + | safe_touch("root/var/service/phplist/down"); |
| + | safe_symlink("restart", "root/etc/e-smith/events/webapps-update/services2adjust/phplist"); |
| + | |
| + | service_link_enhanced('phplist', 'S98', '7'); |
| + | service_link_enhanced('phplist', 'K12', '6'); |
| + | service_link_enhanced('phplist', 'K12', '0'); |
| + | |
| + | safe_touch("root/var/lib/phplist/bounces.mbox"); |
| | | |
| [[Category:SME Server Development Framework]] | | [[Category:SME Server Development Framework]] |
| [[Category:Development Tools]] | | [[Category:Development Tools]] |
| [[Category:SME9-Development]] | | [[Category:SME9-Development]] |