From 985afc70afd81d8aa9e9219d9fb31bd03576288b Mon Sep 17 00:00:00 2001 From: root Date: Mon, 30 Sep 2019 13:51:06 +0200 Subject: [PATCH] daily autocommit --- .etckeeper | 2 ++ init.d/nessusd | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ rc0.d/K01nessusd | 1 + rc1.d/K01nessusd | 1 + rc2.d/S02nessusd | 1 + rc3.d/S02nessusd | 1 + rc4.d/S02nessusd | 1 + rc5.d/S02nessusd | 1 + rc6.d/K01nessusd | 1 + tenable_tag | 1 + 10 files changed, 102 insertions(+) create mode 100755 init.d/nessusd create mode 120000 rc0.d/K01nessusd create mode 120000 rc1.d/K01nessusd create mode 120000 rc2.d/S02nessusd create mode 120000 rc3.d/S02nessusd create mode 120000 rc4.d/S02nessusd create mode 120000 rc5.d/S02nessusd create mode 120000 rc6.d/K01nessusd create mode 100644 tenable_tag diff --git a/.etckeeper b/.etckeeper index 3fae96f..f5c4bb8 100755 --- a/.etckeeper +++ b/.etckeeper @@ -1795,6 +1795,7 @@ maybe chmod 0755 'init.d/mountkernfs.sh' maybe chmod 0755 'init.d/mountnfs-bootclean.sh' maybe chmod 0755 'init.d/mountnfs.sh' maybe chmod 0755 'init.d/mysql' +maybe chmod 0755 'init.d/nessusd' maybe chmod 0755 'init.d/network-manager' maybe chmod 0755 'init.d/networking' maybe chmod 0755 'init.d/ntp' @@ -2840,6 +2841,7 @@ maybe chmod 0644 'systemd/user.conf' maybe chmod 0755 'systemd/user/default.target.wants' maybe chmod 0755 'teamviewer' maybe chmod 0644 'teamviewer/global.conf' +maybe chmod 0600 'tenable_tag' maybe chmod 0755 'terminfo' maybe chmod 0644 'terminfo/README' maybe chmod 0755 'testssl' diff --git a/init.d/nessusd b/init.d/nessusd new file mode 100755 index 0000000..82bc35a --- /dev/null +++ b/init.d/nessusd @@ -0,0 +1,92 @@ +#!/bin/bash +### BEGIN INIT INFO +# Provides: nessusd +# Required-Start: $network $local_fs $remote_fs +# Required-Stop: $network $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Starts and stops the Nessus +# Description: Starts and stops the Nessus +### END INIT INFO +# +# description: Starts and stops the Nessus Scanner +# + +NESSUS_PREFIX="/opt/nessus" +NESSUS_NAME="Nessus" +NESSUS_SERVICE=${NESSUS_PREFIX}/sbin/nessus-service +NESSUS_PID_FILE=${NESSUS_PREFIX}/var/nessus/nessus-service.pid + +test -x $NESSUS_SERVICE || { + echo "$NESSUS_NAME not properly installed" + exit 1 +} + +RETVAL=0 + + +start() { + KIND="$NESSUS_NAME" + echo -n $"Starting $NESSUS_NAME : " + $NESSUS_SERVICE -D -q + echo "." + return 0 +} + +stop() { + echo -n $"Shutting down $NESSUS_NAME : " + if [ -f "$NESSUS_PID_FILE" ] + then + pid=$(cat $NESSUS_PID_FILE) + if [ -n "$pid" -a -d /proc/$pid ] + then + kill $pid + fi + fi + echo "." + return 0 +} + +restart() { + stop + sleep 3 + start +} + +status() { + if [ -f "$NESSUS_PID_FILE" ] + then + exp_pid=$(cat $NESSUS_PID_FILE) + pid_dir="/proc/$exp_pid" + if [ -d "$pid_dir" ] + then + if [ "$(cat ${pid_dir}/stat | awk '{print $2}' | tr -d '()')" == "nessus-service" ] + then + echo "$NESSUS_NAME is running" + return 0 + fi + fi + fi + echo "$NESSUS_NAME is not running" + return 3 +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + status) + status + ;; + *) + echo $"Usage: $0 {start|stop|restart|status}" + exit 1 +esac + +exit $? diff --git a/rc0.d/K01nessusd b/rc0.d/K01nessusd new file mode 120000 index 0000000..f57ce53 --- /dev/null +++ b/rc0.d/K01nessusd @@ -0,0 +1 @@ +../init.d/nessusd \ No newline at end of file diff --git a/rc1.d/K01nessusd b/rc1.d/K01nessusd new file mode 120000 index 0000000..f57ce53 --- /dev/null +++ b/rc1.d/K01nessusd @@ -0,0 +1 @@ +../init.d/nessusd \ No newline at end of file diff --git a/rc2.d/S02nessusd b/rc2.d/S02nessusd new file mode 120000 index 0000000..f57ce53 --- /dev/null +++ b/rc2.d/S02nessusd @@ -0,0 +1 @@ +../init.d/nessusd \ No newline at end of file diff --git a/rc3.d/S02nessusd b/rc3.d/S02nessusd new file mode 120000 index 0000000..f57ce53 --- /dev/null +++ b/rc3.d/S02nessusd @@ -0,0 +1 @@ +../init.d/nessusd \ No newline at end of file diff --git a/rc4.d/S02nessusd b/rc4.d/S02nessusd new file mode 120000 index 0000000..f57ce53 --- /dev/null +++ b/rc4.d/S02nessusd @@ -0,0 +1 @@ +../init.d/nessusd \ No newline at end of file diff --git a/rc5.d/S02nessusd b/rc5.d/S02nessusd new file mode 120000 index 0000000..f57ce53 --- /dev/null +++ b/rc5.d/S02nessusd @@ -0,0 +1 @@ +../init.d/nessusd \ No newline at end of file diff --git a/rc6.d/K01nessusd b/rc6.d/K01nessusd new file mode 120000 index 0000000..f57ce53 --- /dev/null +++ b/rc6.d/K01nessusd @@ -0,0 +1 @@ +../init.d/nessusd \ No newline at end of file diff --git a/tenable_tag b/tenable_tag new file mode 100644 index 0000000..3248403 --- /dev/null +++ b/tenable_tag @@ -0,0 +1 @@ +be4e4cba55124662a0ce376ec860321a \ No newline at end of file -- 2.43.0