Commit 6ed95f60 authored by mlsuyt2718's avatar mlsuyt2718

generate configuration folder with python3 and python3.7 if failure

parent fe4fd7e5
......@@ -5,10 +5,9 @@
# contact mail : <pytlin@protonmail.com>
VERSION="2019.05.04"
set -e
#set -e
#set -x
# VARIABLES
......@@ -169,13 +168,18 @@ generateConfFolder () {
noError="false"
if [ ! -d "$HOME/.gmixer" ]; then
if [ "$OS" = "Debian GNU/Linux" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Raspbian GNU/Linux" ]; then
$(which python3.7) $HOME/gmixer-py/server.py -i
$(which python3) $HOME/gmixer-py/server.py -i 2> /dev/null
checkCommand
if test $noError = "false"
then
$(which python3.7) $HOME/gmixer-py/server.py -i 2> /dev/null
checkCommand
fi
elif [ "$OS" = "CentOS Linux" ]; then
$(which python3.6) $HOME/gmixer-py/server.py -i
$(which python3) $HOME/gmixer-py/server.py -i 2> /dev/null
checkCommand
else
$(which python3.7) $HOME/gmixer-py/server.py -i
$(which python3) $HOME/gmixer-py/server.py -i 2> /dev/null
checkCommand
fi
else
......@@ -408,9 +412,15 @@ checkInstallPython () {
launchGMixer () {
noError="false"
if [ "$OS" = "Debian GNU/Linux" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Raspbian GNU/Linux" ]; then
python3.7 $HOME/gmixer-py/server.py -s -d $HOME/.gmixer
$(which python3.7) $HOME/gmixer-py/server.py -s -d $HOME/.gmixer
checkCommand
if test $noError = "false"
then
$(which python3) $HOME/gmixer-py/server.py -s -d $HOME/.gmixer
fi
elif [ "$OS" = "CentOS Linux" ]; then
python3.6 $HOME/gmixer-py/server.py -s -d $HOME/.gmixer
$(which python3.6) $HOME/gmixer-py/server.py -s -d $HOME/.gmixer
else
printf "\n%bdistribution not yet supported...%b\n" "${yellow}" "${rescolor}"
exit 1
......@@ -827,11 +837,6 @@ mainVerbose () {
fi
fi
fi
if [ "$parameterG" = "true" ]
then
printf "%bGenerate Salt and Password...%b\n" "${yellow}" "${rescolor}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment