summaryrefslogtreecommitdiff
path: root/scripts/linux-setup.sh
diff options
context:
space:
mode:
authorNick Fox <nick@foxsec.net>2017-11-19 22:06:36 -0500
committerNick Fox <nick@foxsec.net>2017-11-19 22:06:36 -0500
commitadfddcf0ce0875df4512cd05a58cd1d5bc7e49d5 (patch)
treedb8fea15f80c10c4b5beafafc2415fb31ccdebf6 /scripts/linux-setup.sh
parent9850719b95278ff9890fff3551623635404b4f0c (diff)
Check python version and use python2 if python3 is default
Diffstat (limited to 'scripts/linux-setup.sh')
-rwxr-xr-xscripts/linux-setup.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/linux-setup.sh b/scripts/linux-setup.sh
index c0e3697f..c6e376ce 100755
--- a/scripts/linux-setup.sh
+++ b/scripts/linux-setup.sh
@@ -61,7 +61,12 @@ lastrun()
pythonpath()
{
echo Configuring python path
- ${SUDO}python ${BNPATH}/scripts/install_api.py $ROOT
+ if [[ $(python -V) == "Python 3."* ]]
+ then
+ ${SUDO}python2 ${BNPATH}/scripts/install_api.py $ROOT
+ else
+ ${SUDO}python ${BNPATH}/scripts/install_api.py $ROOT
+ fi
}
createdesktopfile()