aboutsummaryrefslogtreecommitdiff
path: root/network/metasploit/metasploit.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/metasploit/metasploit.SlackBuild')
-rw-r--r--network/metasploit/metasploit.SlackBuild15
1 files changed, 11 insertions, 4 deletions
diff --git a/network/metasploit/metasploit.SlackBuild b/network/metasploit/metasploit.SlackBuild
index 2c846a468c6b4..3a7d6458fd678 100644
--- a/network/metasploit/metasploit.SlackBuild
+++ b/network/metasploit/metasploit.SlackBuild
@@ -27,7 +27,7 @@
# variable just try to launch the script redefining this.
PRGNAM=metasploit
-VERSION=${VERSION:-4.6.0}
+VERSION=${VERSION:-4.7.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -97,7 +97,13 @@ $CWD/metasploit-$VERSION-linux$INSTALLERARCH-installer.run \
# Stop Metasploit Framework PostgreSQL
echo "Stopping Metasploit Framework..."
INITSCRIPT=metasploit
-/etc/init.d/$INITSCRIPT stop
+if ! /etc/init.d/$INITSCRIPT stop; then
+ echo "Waiting for PostgreSQL to finish deferred work..."
+ PSPID=$(head -1 /$INSTDIR/postgresql/data/postmaster.pid)
+ while kill -0 $PSPID 2>/dev/null; do
+ sleep 1;
+ done
+fi
# Move install dir
mkdir -p $PKG/$BASEINSTDIR
@@ -112,10 +118,11 @@ rm -f /etc/rc.d/rc?.d/S80metasploit /etc/rc.d/rc?.d/K30metasploit
mv /etc/init.d/$INITSCRIPT $PKG/etc/rc.d/rc.$INITSCRIPT.new
chown root:root $PKG/etc/rc.d/rc.$INITSCRIPT.new
chmod 755 $PKG/etc/rc.d/rc.$INITSCRIPT.new
-# Default installation makes pro stuff, starting metasploit_SCRIPT and PROSVC_SCRIPT. Disable this...
-# We want only to start framework's PostgresSQL
+# Default installation makes pro stuff, starting METASPLOIT_SCRIPT, PROSVC_SCRIPT and WORKER_SCRIPT. Disable this...
+# We want only to start framework's PostgreSQL
chmod -x $PKG/$INSTDIR/apps/pro/ui/scripts/ctl.sh
chmod -x $PKG/$INSTDIR/apps/pro/engine/scripts/ctl.sh
+chmod -x $PKG/$INSTDIR/apps/pro/ui/scripts/worker_ctl.sh
# Install /usr/bin links
mkdir -p $PKG/usr/bin