From patchwork Sun Jun 28 10:47:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Feddersen X-Patchwork-Id: 3229 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 49vnQZ0Pxvz3x34 for ; Sun, 28 Jun 2020 10:48:06 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 49vnQY4kxkz2JX; Sun, 28 Jun 2020 10:48:05 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 49vnQY3hVwz2ySq; Sun, 28 Jun 2020 10:48:05 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 49vnQX1rzWz2yNV for ; Sun, 28 Jun 2020 10:48:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 49vnQV1yfWz1XW; Sun, 28 Jun 2020 10:48:02 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1593341282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=2oTGHWYXrBCkncCK4bUDjM4GDtd78tmJWxG6adLxKM8=; b=vZS+q5G2uVD0hYbNaDCHnMG3RSIsgZjhHArmFYNwzoY/+ZjoHpEA4NPdJ8+GU5BqgRbmgk CQnJtsw94icP7fCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1593341282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=2oTGHWYXrBCkncCK4bUDjM4GDtd78tmJWxG6adLxKM8=; b=sIHIq8nGl5VlAhl+HtjlWLCeIdoaCayoQ2f5lzLYhtqKo2BwaZq//ov7Ddl6tVuEfq52km 7UiEk8d+VEVNMfN1Dta7u47yy9z3FDtVC07PdMR/Zw25JqR+qdHk7WKq+555UR85NafvS7 +V+WfmK4lkqXbMNYrQ/r8qGtFE7ZYM1rBXtdOl0VqJhXHM6nR0s9c85lrxuo2GjPeye9wk iljLGLps6U7ODRg9xJej2nAz1fRficQz4L+eQiTYHa/UxpAyn6OtLVuwIReUbSJaDZKMLS CAaWxJh7SPq2riZI2heVIbobNgf42hSoSYPw4kZbjsIuGUVH9ZcApcsCziJxuw== From: Stephan Feddersen To: development@lists.ipfire.org Subject: [PATCH] WIO - shutdown function removed, adjustments to IPsec status display Date: Sun, 28 Jun 2020 12:47:54 +0200 Message-Id: <20200628104754.28809-1-sfeddersen@ipfire.org> Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=sfeddersen@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephan Feddersen Errors-To: development-bounces@lists.ipfire.org Sender: "Development" --- src/wio/wio-lib.pl | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/wio/wio-lib.pl b/src/wio/wio-lib.pl index 1ff7cfacc..eb7b33e7d 100644 --- a/src/wio/wio-lib.pl +++ b/src/wio/wio-lib.pl @@ -21,14 +21,14 @@ # # ############################################################################### # -# Version: 2020/26/04 19:35:23 +# Version: 2020/05/25 19:39:23 # -# This wio-lib.pl is based on the Code from the IPCop WIO Addon +# This wio-lib.pl is based on the code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. # # Autor: Stephan Feddersen # Co-Autor: Alexander Marx -# Co-Autor: Frank Mainz +# Co-Autor: Frank Mainz (for some code for the IPCop WIO Addon) # package WIO; @@ -45,10 +45,9 @@ require '/var/ipfire/general-functions.pl'; require '/var/ipfire/header.pl'; require '/var/ipfire/lang.pl'; -my $mailfile = "${General::swroot}/dma/mail.conf"; -my %mail = (); +my %mailsettings = (); -&General::readhash($mailfile, \%mail); +&General::readhash('/var/ipfire/dma/mail.conf', \%mailsettings); ############################################################################################################################ @@ -91,6 +90,14 @@ sub contime { if ( $temp[1] eq 'minutes' ) { $totalsecs = $temp[0] * 60; } + + if ( $temp[1] eq 'hours' ) { + $totalsecs = $temp[0] * 3600; + } + + if ( $temp[1] eq 'days' ) { + $totalsecs = $temp[0] * 86400; + } } if ( $vpn eq 'ovpn' ) { @@ -147,8 +154,8 @@ sub mailsender { my $msg = ''; $msg = MIME::Lite->new( - From => $mail{'SENDER'}, - To => $mail{'RECIPIENT'}, + From => $mailsettings{'SENDER'}, + To => $mailsettings{'RECIPIENT'}, Subject => $_[0], Type => 'multipart/mixed' );