Script fixes

This commit is contained in:
David Tomaschik
2026-08-26 16:56:15 -07:00
parent 3666115090
commit ae111baa2b
8 changed files with 62 additions and 29 deletions

View File

@@ -1,12 +1,12 @@
#!/bin/bash
if [ `whoami` != "root" ] ; then
if [ "$(id -u)" -ne 0 ] ; then
echo "This must be run as root." >&2
exit 1
fi
BASEDIR=`dirname $0`
if ! test -f ${BASEDIR}/keys/gpg/kali-repo.key ; then
BASEDIR="$(dirname "$0")"
if ! test -f "${BASEDIR}/keys/gpg/kali-repo.key" ; then
echo "Couldn't find key, are you in the right place?" >&2
exit 1
fi
@@ -15,6 +15,6 @@ cat >/etc/apt/sources.list.d/kali.list <<KALI_EOF
deb http://http.kali.org/kali kali-rolling main contrib non-free
KALI_EOF
/usr/bin/apt-key add ${BASEDIR}/keys/gpg/kali-repo.key
/usr/bin/apt-key add "${BASEDIR}/keys/gpg/kali-repo.key"
/usr/bin/apt-get update
/usr/bin/apt-get install -y kali-linux-full