#!/bin/sh

# Script to start Zenmap as root.
# Faheem Pervez <trippin1@gmail.com>
# GPLv3 (if it matters..)

# Change me to "1" if you'd rather not use the Hildon theme. 
DONTUSETHEME=0

ZENMAP=/usr/bin/zenmap

if [ ! -x $ZENMAP ]; then
	dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"Zenmap not found"
	exit 1
fi

if [ $DONTUSETHEME -eq 1 ]; then
	CMD=$ZENMAP
else
	CMD="/usr/bin/run-standalone.sh $ZENMAP"
fi

exec sudo $CMD &
