generated from smedev/Template-for-SMEServer-Core-Package
* Sun Sep 01 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.6-1.sme
- initial version for SME11 [SME: ]
This commit is contained in:
81
createlinks
81
createlinks
@@ -1,43 +1,74 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use esmith::Build::CreateLinks qw(:all);
|
||||
use esmith::Build::Backup qw(:all);
|
||||
|
||||
# our event specific for updating with yum without reboot
|
||||
$event = 'smeserver-roundcube-update';
|
||||
# Koozali event specific for updating with yum without reboot
|
||||
$event = "smeserver-roundcube-update";
|
||||
#add here the path to your templates needed to expand
|
||||
#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
|
||||
|
||||
# Maybe need ths in here as well:
|
||||
# /etc/dar/DailyBackup.dcf - if backup requested
|
||||
|
||||
foreach my $file (qw(
|
||||
/etc/systemd/system-preset/49-koozali.preset
|
||||
))
|
||||
{
|
||||
templates2events( $file, $event );
|
||||
};
|
||||
}
|
||||
|
||||
#action needed in case we have a systemd unit
|
||||
event_link('systemd-default', $event, '10');
|
||||
event_link('systemd-reload', $event, '50');
|
||||
|
||||
#services we might need to restart
|
||||
#event_services($event, 'xxxx' => 'restart', 'yyyy' => 'restart');
|
||||
|
||||
#Backup contrib files
|
||||
# backup_includes("smeserver-roundcube", qw(
|
||||
# files(s) to be backed up
|
||||
#));
|
||||
|
||||
#Other possible entries:
|
||||
#Server manager entry
|
||||
#panel_link("smeserver-roundcube", 'manager');
|
||||
#Events to smeserver-roundcube
|
||||
#$event = 'smeserver-roundcube-smeserver-roundcube';
|
||||
# safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smeserver-roundcube");
|
||||
# templates2events("/etc/smeserver-roundcube/smeserver-roundcube.conf", $event);
|
||||
event_link("systemd-default", $event, "10");
|
||||
event_link("systemd-reload", $event, "50");
|
||||
|
||||
#action specific to this package
|
||||
#event_link("some event", $event, "30");
|
||||
#services we need to restart
|
||||
#safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/some service");
|
||||
#and Server Manager panel link
|
||||
#panel_link('somefunction', 'manager');
|
||||
|
||||
|
||||
#expand specific roundcube template
|
||||
for my $event (qw(
|
||||
smeserver-roundcube-update
|
||||
bootstrap-console-save
|
||||
conf-roundcube
|
||||
roundcube-update
|
||||
console-save
|
||||
))
|
||||
{
|
||||
templates2events("/usr/share/roundcubemail/plugins/managesieve/config.inc.php", $event);
|
||||
templates2events("/usr/share/roundcubemail/plugins/nextcloud_attachments/config.inc.php", $event);
|
||||
templates2events("/etc/roundcubemail/config.inc.php", $event);
|
||||
templates2events("/etc/e-smith/sql/init/80roundcube", $event);
|
||||
|
||||
}
|
||||
|
||||
#restart specific services to avoid to reboot after the installation
|
||||
for my $event (qw(
|
||||
smeserver-roundcube-update
|
||||
conf-roundcube
|
||||
roundcube-update
|
||||
))
|
||||
{
|
||||
templates2events("/etc/opt/remi/php81/php-fpm.d/www.conf",$event);
|
||||
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
||||
templates2events("/etc/dovecot/dovecot.conf", $event);
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/php81-php-fpm");
|
||||
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");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dovecot");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
}
|
||||
|
||||
|
||||
#We want to expand /etc/e-smith/templates-user/.qmail
|
||||
foreach my $event (qw(
|
||||
smeserver-roundcube-update
|
||||
conf-roundcube
|
||||
roundcube-update
|
||||
))
|
||||
{
|
||||
event_link("qmail-update-user", $event, "20");
|
||||
event_link("roundcube-conf", $event, "03");
|
||||
}
|
||||
safe_symlink("/usr/share/php/Net/LDAP3","root/usr/share/pear/Net/LDAP3");
|
||||
safe_symlink("/usr/share/php/Net/LDAP3.php","root/usr/share/pear/Net/LDAP3.php");
|
||||
|
Reference in New Issue
Block a user