/usr/bin/openvas-setup is in openvas 9.0.2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/bin/bash
if ! grep -q "^unixsocket /var/run/redis/redis.sock" /etc/redis/redis.conf ; then
sed -i -e 's/^\(#.\)\?port.*$/port 0/' /etc/redis/redis.conf
sed -i -e 's/^\(#.\)\?unixsocket \/.*$/unixsocket \/var\/run\/redis\/redis.sock/' /etc/redis/redis.conf
sed -i -e 's/^\(#.\)\?unixsocketperm.*$/unixsocketperm 700/' /etc/redis/redis.conf
fi
openvas-manage-certs -V 2>/dev/null
if [ $? -ne 0 ]; then
openvas-manage-certs -a
fi
greenbone-nvt-sync
greenbone-scapdata-sync
greenbone-certdata-sync
service openvas-manager stop
service openvas-scanner stop
openvassd
openvasmd --migrate
openvasmd --rebuild
killall openvassd
sleep 15
service openvas-scanner start
service openvas-manager start
service greenbone-security-assistant restart
if ! openvasmd --get-users | grep -q ^admin$ ; then
openvasmd --create-user=admin
fi
|