/[smecontribs]/rpms/smeserver-bandwidthd/contribs10/smeserver-bandwidthd-2.0.1.2-Update-Creatlinks-with-systemd-stuff.patch
ViewVC logotype

Contents of /rpms/smeserver-bandwidthd/contribs10/smeserver-bandwidthd-2.0.1.2-Update-Creatlinks-with-systemd-stuff.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Feb 3 11:32:50 2021 UTC (3 years, 8 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-bandwidthd-2_0_1_2-12_el7_sme, smeserver-bandwidthd-2_0_1_2-15_el7_sme, smeserver-bandwidthd-2_0_1_2-18_el7_sme, smeserver-bandwidthd-2_0_1_2-17_el7_sme, smeserver-bandwidthd-2_0_1_2-11_el7_sme, smeserver-bandwidthd-2_0_1_2-14_el7_sme, smeserver-bandwidthd-2_0_1_2-13_el7_sme, smeserver-bandwidthd-2_0_1_2-16_el7_sme, HEAD
* Tue Feb 02 2021 Brian Read <brianr@bjsystems.co.uk> 2.0.1.2-11.sme
- Update-Creatlinks-with-systemd-stuff [SME: 11046]

1 diff -urN smeserver-bandwidthd-2.0.1.2.old/createlinks smeserver-bandwidthd-2.0.1.2/createlinks
2 --- smeserver-bandwidthd-2.0.1.2.old/createlinks 2021-02-02 18:44:48.107733852 +0000
3 +++ smeserver-bandwidthd-2.0.1.2/createlinks 2021-02-03 11:26:32.565366516 +0000
4 @@ -9,12 +9,11 @@
5 templates2events("/etc/e-smith/sql/init/80bandwidthd", qw( conf-bandwidthd bootstrap-console-save post-upgrade));
6 templates2events("/etc/bandwidthd.conf", qw( conf-bandwidthd bootstrap-console-save post-upgrade));
7 templates2events("/var/www/bandwidthd/phphtdocs/config.conf", qw( conf-bandwidthd bootstrap-console-save post-upgrade));
8 -
9 templates2events("/etc/httpd/conf/httpd.conf", qw( conf-bandwidthd ));
10
11 # services to launch on event
12 safe_symlink("restart", "root/etc/e-smith/events/conf-bandwidthd/services2adjust/bandwidthd");
13 - safe_symlink("sigusr1", "root/etc/e-smith/events/conf-bandwidthd/services2adjust/httpd-e-smith");
14 + safe_symlink("restart", "root/etc/e-smith/events/conf-bandwidthd/services2adjust/httpd-e-smith");
15 safe_symlink("restart", "root/etc/e-smith/events/conf-bandwidthd/services2adjust/mysql.init");
16
17 # links for rc.d from init.d
18 @@ -26,26 +25,34 @@
19
20 safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/var/www/bandwidthd/phphtdocs/config.conf/template-begin");
21 safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/var/www/bandwidthd/phphtdocs/config.conf/template-end");
22 -#safe_symlink("../../../functions/wrapper", "root/etc/e-smith/web/panels/manager/cgi-bin/bandwidthd");
23
24 #Server manager link
25 +#safe_symlink("../../../functions/wrapper", "root/etc/e-smith/web/panels/manager/cgi-bin/bandwidthd");
26 panel_link("bandwidthd","manager");
27
28 -# rpm update action (invoked by yum on install and update
29 -$contrib = "smeserver-bandwidthd";
30 -event_actions("$contrib-update", qw(
31 - systemd-default 10
32 -));
33 -
34 -event_templates("$contrib-update", qw(
35 - /etc/httpd/conf/httpd.conf
36 - /etc/crontab
37 - /etc/systemd/system-preset/49-koozali.preset
38 -
39 -));
40 -
41 -event_services("$contrib-update", qw(
42 - httpd-e-smith sigusr1
43 - php-fpm reload
44 -));
45 -
46 +# our event specific for updating with yum without reboot
47 +$event = "smeserver-bandwidthd-update";
48 +#add here the path to your templates needed to expand
49 +#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
50 +
51 +foreach my $file (qw(
52 + /etc/systemd/system-preset/49-koozali.preset
53 + /etc/e-smith/sql/init/80bandwidthd
54 + /etc/bandwidthd.conf
55 + /var/www/bandwidthd/phphtdocs/config.conf
56 + /etc/httpd/conf/httpd.conf
57 +))
58 +{
59 + templates2events( $file, $event );
60 +}
61 +
62 +#action needed in case we have a systemd unit
63 +event_link("systemd-default", $event, "10");
64 +event_link("systemd-reload", $event, "50");
65 +
66 +#action specific to this package
67 +#event_link("conf-timezone", $event, "30");
68 +#services we need to restart
69 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/bandwidthd");
70 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
71 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed