/[smecontribs]/rpms/smeserver-libreswan/contribs10/smeserver-libreswan-check-l2tpd-status.patch
ViewVC logotype

Contents of /rpms/smeserver-libreswan/contribs10/smeserver-libreswan-check-l2tpd-status.patch

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


Revision 1.1 - (show annotations) (download)
Mon Feb 22 16:03:28 2021 UTC (3 years, 9 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-libreswan-0_5-36_el7_sme, smeserver-libreswan-0_5-35_el7_sme, HEAD
Initial import

1 diff -ruN smeserver-libreswan-0.5.old/root/etc/e-smith/events/actions/ipsec-update smeserver-libreswan-0.5/root/etc/e-smith/events/actions/ipsec-update
2 --- smeserver-libreswan-0.5.old/root/etc/e-smith/events/actions/ipsec-update 2019-10-13 15:53:37.309683246 +0200
3 +++ smeserver-libreswan-0.5/root/etc/e-smith/events/actions/ipsec-update 2019-10-13 15:53:46.567138415 +0200
4 @@ -78,11 +78,13 @@
5 if ( $configDB->get_prop( $ipsecDBkey, 'status' ) eq 'enabled' ) {
6
7 # Sort out xl2tpd - if ipsec is enabled, AND xl2tpd then see if it is started
8 - if ( $configDB->get_prop( $xl2tpdDBkey, 'status' ) eq 'enabled' ) {
9 - my $xl2tpdstatus = (`ps ax | grep -v grep | grep xl2tpd`);
10 + my $xl2tpdstatus = $configDB->get_prop( $xl2tpdDBkey, 'status' ) || 'disabled';
11 +
12 + if ( $xl2tpdstatus eq 'enabled' ) {
13 + my $xl2tpdService = (`ps ax | grep -v grep | grep xl2tpd`);
14
15 #If the service is not running then start it
16 - unless ( $xl2tpdstatus =~ m/_xl2tpd/ ) {
17 + unless ( $xl2tpdService =~ m/_xl2tpd/ ) {
18
19 print "Xl2tpd Information - xl2tpd enabled but stopped - starting xl2tpd \n";
20 my $myStartXl2tpd = qx(/etc/rc.d/init.d/xl2tpd start)

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