/[smecontribs]/rpms/smeserver-openvpn-routed/contribs10/smeserver-openvpn-routed-0.1.6-Add-in-systemd-startup.patch
ViewVC logotype

Contents of /rpms/smeserver-openvpn-routed/contribs10/smeserver-openvpn-routed-0.1.6-Add-in-systemd-startup.patch

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


Revision 1.1 - (show annotations) (download)
Mon Feb 8 15:54:18 2021 UTC (3 years, 8 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-openvpn-routed-0_1_6-5_el7_sme, smeserver-openvpn-routed-0_1_6-3_el7_sme, smeserver-openvpn-routed-0_1_6-6_el7_sme, smeserver-openvpn-routed-0_1_6-4_el7_sme, smeserver-openvpn-routed-0_1_6-2_el7_sme, smeserver-openvpn-routed-0_1_6-7_el7_sme, HEAD
Error occurred while calculating annotation data.
* Thu Feb 04 2021 Brian Read <brianr@bjsystems.co.uk> 0.1.6-2.sme
- Initial import to SME10 [SME: 11336]
- Add-in-systemd-startup

1 diff -urN smeserver-openvpn-routed-0.1.6.old/createlinks smeserver-openvpn-routed-0.1.6/createlinks
2 --- smeserver-openvpn-routed-0.1.6.old/createlinks 2017-04-10 10:18:32.000000000 +0100
3 +++ smeserver-openvpn-routed-0.1.6/createlinks 2021-02-08 15:09:37.100717546 +0000
4 @@ -6,11 +6,11 @@
5 safe_symlink("restart", "root/etc/e-smith/events/network-create/services2adjust/openvpn-routed");
6 safe_symlink("restart", "root/etc/e-smith/events/network-delete/services2adjust/openvpn-routed");
7
8 -service_link_enhanced("openvpn-routed", "S80", "7");
9 -service_link_enhanced("openvpn-routed", "K25", "6");
10 -service_link_enhanced("openvpn-routed", "K25", "0");
11 +#service_link_enhanced("openvpn-routed", "S80", "7");
12 +#service_link_enhanced("openvpn-routed", "K25", "6");
13 +#service_link_enhanced("openvpn-routed", "K25", "0");
14
15 -safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/openvpn-routed');
16 +#safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/openvpn-routed');
17 safe_symlink("/var/service/openvpn-routed" , 'root/service/openvpn-routed');
18
19 safe_touch("root/var/service/openvpn-routed/down");
20 @@ -32,3 +32,27 @@
21 #event_link("openvpn-routed-reload-ccd", "openvpn-routed-reload-ccd", "20");
22 #event_link("openvpn-routed-update-crl", "openvpn-routed-reload-ccd", "30");
23
24 +# our event specific for updating with yum without reboot
25 +$event = "smeserver-openvpn-routed-update";
26 +#add here the path to your templates needed to expand
27 +#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
28 +
29 +foreach my $file (qw(
30 + /etc/systemd/system-preset/49-koozali.preset
31 + /etc/crontab
32 + /etc/openvpn/routed/management-pass.txt
33 + /etc/openvpn/routed/openvpn.conf
34 +
35 +))
36 +{
37 + templates2events( $file, $event );
38 +}
39 +
40 +#action needed in case we have a systemd unit
41 +event_link("systemd-default", $event, "10");
42 +event_link("systemd-reload", $event, "50");
43 +
44 +#action specific to this package
45 +event_link("openvpn-routed-update", $event, "60");
46 +#services we need to restart
47 +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/openvpn-routed");
48 diff -urN smeserver-openvpn-routed-0.1.6.old/root/usr/lib/systemd/system/openvpn-routed.service smeserver-openvpn-routed-0.1.6/root/usr/lib/systemd/system/openvpn-routed.service
49 --- smeserver-openvpn-routed-0.1.6.old/root/usr/lib/systemd/system/openvpn-routed.service 1970-01-01 01:00:00.000000000 +0100
50 +++ smeserver-openvpn-routed-0.1.6/root/usr/lib/systemd/system/openvpn-routed.service 2021-02-08 14:53:18.258363519 +0000
51 @@ -0,0 +1,9 @@
52 +[Unit]
53 +Description=OpenVPN Server to Server
54 +After=network.service
55 +[Service]
56 +Type=forking
57 +ExecStart=/usr/sbin/systemd/openvpn-routed
58 +[Install]
59 +WantedBy=sme-server.target
60 +
61 diff -urN smeserver-openvpn-routed-0.1.6.old/root/usr/sbin/systemd/openvpn-routed smeserver-openvpn-routed-0.1.6/root/usr/sbin/systemd/openvpn-routed
62 --- smeserver-openvpn-routed-0.1.6.old/root/usr/sbin/systemd/openvpn-routed 1970-01-01 01:00:00.000000000 +0100
63 +++ smeserver-openvpn-routed-0.1.6/root/usr/sbin/systemd/openvpn-routed 2021-02-08 14:52:09.525737323 +0000
64 @@ -0,0 +1,6 @@
65 +#!/bin/sh
66 +
67 +exec 2>&1
68 +
69 +exec /usr/sbin/openvpn --config /etc/openvpn/routed/openvpn.conf --cd /etc/openvpn/routed
70 +

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