]> git.hoellein.online Git - zenbook/commitdiff
daily autocommit
authorroot <root@localhost>
Mon, 30 Sep 2019 11:51:06 +0000 (13:51 +0200)
committerroot <root@localhost>
Mon, 30 Sep 2019 11:51:06 +0000 (13:51 +0200)
.etckeeper
init.d/nessusd [new file with mode: 0755]
rc0.d/K01nessusd [new symlink]
rc1.d/K01nessusd [new symlink]
rc2.d/S02nessusd [new symlink]
rc3.d/S02nessusd [new symlink]
rc4.d/S02nessusd [new symlink]
rc5.d/S02nessusd [new symlink]
rc6.d/K01nessusd [new symlink]
tenable_tag [new file with mode: 0644]

index 3fae96fe9e651ac426304195f36b25de3134f068..f5c4bb8ee9e9eea6f64d97a2b7d961d92968b86b 100755 (executable)
@@ -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 (executable)
index 0000000..82bc35a
--- /dev/null
@@ -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 (symlink)
index 0000000..f57ce53
--- /dev/null
@@ -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 (symlink)
index 0000000..f57ce53
--- /dev/null
@@ -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 (symlink)
index 0000000..f57ce53
--- /dev/null
@@ -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 (symlink)
index 0000000..f57ce53
--- /dev/null
@@ -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 (symlink)
index 0000000..f57ce53
--- /dev/null
@@ -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 (symlink)
index 0000000..f57ce53
--- /dev/null
@@ -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 (symlink)
index 0000000..f57ce53
--- /dev/null
@@ -0,0 +1 @@
+../init.d/nessusd
\ No newline at end of file
diff --git a/tenable_tag b/tenable_tag
new file mode 100644 (file)
index 0000000..3248403
--- /dev/null
@@ -0,0 +1 @@
+be4e4cba55124662a0ce376ec860321a
\ No newline at end of file