From aa5b20a58d0fe3753d6c05d59f2dde942956a838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cenk=20K=C4=B1l=C4=B1=C3=A7?= Date: Wed, 20 Jan 2021 00:31:36 +0100 Subject: [PATCH] update logging stuff --- build/services.d/softether-vpnsrv/run | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build/services.d/softether-vpnsrv/run b/build/services.d/softether-vpnsrv/run index 52e0524..540d524 100755 --- a/build/services.d/softether-vpnsrv/run +++ b/build/services.d/softether-vpnsrv/run @@ -4,11 +4,11 @@ source /scripts/logger.sh # SOFTETHER START log_start "Starting Softether Server..." -/s6-bin/softether-vpnsrv/vpnserver start +/s6-bin/softether-vpnsrv/vpnserver start >&/dev/null # Start DHCP Server log_start "Starting DHCP server." -/usr/sbin/dnsmasq +/usr/sbin/dnsmasq >&/dev/null log_divider @@ -18,26 +18,26 @@ s6-sleep 3 # Bind to ip address with tap device log_info "Binded IP address to the server with ${SRVIPSUBNET:-10.0.0}.1" -ip tuntap add dev tap_soft mode tap -/sbin/ifconfig tap_soft ${SRVIPSUBNET:-10.0.0}.1 netmask ${SRVIPNETMASK:-255.255.255.0} +ip tuntap add dev tap_soft mode tap >&/dev/null +/sbin/ifconfig tap_soft ${SRVIPSUBNET:-10.0.0}.1 netmask ${SRVIPNETMASK:-255.255.255.0} >&/dev/null # Check health while ping -c 1 -W 10 "${SRVIPSUBNET:-10.0.0}.1" >&/dev/null && pgrep dnsmasq >&/dev/null; do - log_info "[$(date +"%Y%m%d-%H:%M:%S")] Self test success. VPN Server alive and can access ${SRVIPSUBNET:-10.0.0}.1." "top" + log_this "Self test success. VPN Server alive and can access ${SRVIPSUBNET:-10.0.0}.1." "${CYAN}$(date +"%Y%m%d-%H:%M:%S")${RESET}" "INFO" "top" if [[ -z "${KEEP_SERVER_LOG}" ]]; then log_info "Clearing up server log files." - rm /usr/local/libexec/softether/vpnserver/server_log/*.log -f + rm /usr/local/libexec/softether/vpnserver/server_log/*.log -f >&/dev/null fi if [[ -z "${KEEP_PACKET_LOG}" ]]; then log_info "Clearing up packet log files." - rm /usr/local/libexec/softether/vpnserver/packet_log/*.log -f + rm /usr/local/libexec/softether/vpnserver/packet_log/*.log -f >&/dev/null fi if [[ -z "${KEEP_SECURITY_LOG}" ]]; then log_info "Clearing up security log files." - rm /usr/local/libexec/softether/vpnserver/packet_log/*.log -f + rm /usr/local/libexec/softether/vpnserver/packet_log/*.log -f >&/dev/null fi log_wait "Next check in ${SLEEPTIME:-600} seconds."