Commit 6ed95f60 authored by mlsuyt2718's avatar mlsuyt2718

generate configuration folder with python3 and python3.7 if failure

parent fe4fd7e5
...@@ -5,10 +5,9 @@ ...@@ -5,10 +5,9 @@
# contact mail : <pytlin@protonmail.com> # contact mail : <pytlin@protonmail.com>
VERSION="2019.05.04" VERSION="2019.05.04"
set -e #set -e
#set -x #set -x
# VARIABLES # VARIABLES
...@@ -169,13 +168,18 @@ generateConfFolder () { ...@@ -169,13 +168,18 @@ generateConfFolder () {
noError="false" noError="false"
if [ ! -d "$HOME/.gmixer" ]; then if [ ! -d "$HOME/.gmixer" ]; then
if [ "$OS" = "Debian GNU/Linux" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Raspbian GNU/Linux" ]; 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 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 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 checkCommand
else else
$(which python3.7) $HOME/gmixer-py/server.py -i $(which python3) $HOME/gmixer-py/server.py -i 2> /dev/null
checkCommand checkCommand
fi fi
else else
...@@ -408,9 +412,15 @@ checkInstallPython () { ...@@ -408,9 +412,15 @@ checkInstallPython () {
launchGMixer () { launchGMixer () {
noError="false" noError="false"
if [ "$OS" = "Debian GNU/Linux" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Raspbian GNU/Linux" ]; then 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 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 else
printf "\n%bdistribution not yet supported...%b\n" "${yellow}" "${rescolor}" printf "\n%bdistribution not yet supported...%b\n" "${yellow}" "${rescolor}"
exit 1 exit 1
...@@ -827,11 +837,6 @@ mainVerbose () { ...@@ -827,11 +837,6 @@ mainVerbose () {
fi fi
fi fi
fi fi
if [ "$parameterG" = "true" ] if [ "$parameterG" = "true" ]
then then
printf "%bGenerate Salt and Password...%b\n" "${yellow}" "${rescolor}" 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