Commit fe4fd7e5 authored by mlsuyt2718's avatar mlsuyt2718

add libssl-dev in package installation (required for scrypt package) + correct path for python3.7

parent 1402e3c7
......@@ -5,6 +5,7 @@
# contact mail : <pytlin@protonmail.com>
VERSION="2019.05.04"
set -e
......@@ -168,13 +169,13 @@ generateConfFolder () {
noError="false"
if [ ! -d "$HOME/.gmixer" ]; then
if [ "$OS" = "Debian GNU/Linux" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Raspbian GNU/Linux" ]; then
$HOME/gmixer-py/python3.7 server.py -i
$(which python3.7) $HOME/gmixer-py/server.py -i
checkCommand
elif [ "$OS" = "CentOS Linux" ]; then
$HOME/gmixer-py/python3.6 server.py -i
$(which python3.6) $HOME/gmixer-py/server.py -i
checkCommand
else
$HOME/gmixer-py/python3.7 server.py -i
$(which python3.7) $HOME/gmixer-py/server.py -i
checkCommand
fi
else
......@@ -225,10 +226,10 @@ updateSystem () {
installDepPython () {
noError="false"
if [ "$OS" = "Debian GNU/Linux" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Raspbian GNU/Linux" ]; then
sudo apt-get install build-essential sqlite3 bzip2 libbz2-dev zlib1g-dev openssl libgdbm-dev liblzma-dev libreadline-dev libffi-dev apt-transport-https -y
sudo apt-get install build-essential sqlite3 bzip2 libbz2-dev zlib1g-dev openssl libgdbm-dev liblzma-dev libreadline-dev libffi-dev apt-transport-https libssl-dev curl -y # libssl-dev is required otherwise build scrypt failed (error @Shinra)
checkCommand
elif [ "$OS" = "CentOS Linux" ]; then
sudo yum install build-essential sqlite3 bzip2 openssl openssl-devel bzip2-devel libffi-devel -y #non nécessaire libssl-dev
sudo yum install build-essential sqlite3 bzip2 openssl openssl-devel bzip2-devel libffi-devel libssl-devel curl -y # libssl-devel is required otherwise build scrypt failed (error @Shinra)
checkCommand
else
printf "\n%bdistribution not yet supported...%b\n" "${yellow}" "${rescolor}"
......@@ -239,7 +240,7 @@ installDepPython () {
installDepPythonForGMixer () {
noError="false"
if [ "$OS" = "Debian GNU/Linux" ] || [ "$OS" = "Ubuntu" ] || [ "$OS" = "Raspbian GNU/Linux" ]; then
sudo apt-get install python3-pip python3 python-dev python3-dev build-essential libffi-dev libxml2-dev libxslt1-dev zlib1g-dev -y 2> /dev/null
sudo apt-get install python3-pip python3-setuptools python3-wheel python3 python-dev python3-dev build-essential libffi-dev libxml2-dev libxslt1-dev zlib1g-dev -y 2> /dev/null
sudo pip3 install --upgrade pip 2> /dev/null
sudo pip3 install libnacl duniterpy silkaj py-ubjson plyvel PySocks 2> /dev/null
checkCommand
......@@ -642,6 +643,12 @@ main () {
printf "%bInstallation of python dependancies for gmixer...%b" "${yellow}" "${rescolor}"
installDepPythonForGMixer > /dev/null
printOkKo
printf "%bRetrieve project gmixer from gitlab...%b" "${yellow}" "${rescolor}"
getGmixerProject > /dev/null
printOkKo
printf "%bGenerate configuration folder : $HOME/.gmixer...%b" "${yellow}" "${rescolor}"
generateConfFolder > /dev/null
printOkKo
if [ ! -z "$parameterP" ] && [ "$parameterP" != "10951" ]
then
portUse1=$(sudo lsof -i -P -n | grep LISTEN | grep $parameterP | wc -l)
......@@ -664,12 +671,6 @@ main () {
openPortGMixer 10951
printOkKo
fi
printf "%bRetrieve project gmixer from gitlab...%b" "${yellow}" "${rescolor}"
getGmixerProject > /dev/null
printOkKo
printf "%bGenerate configuration folder : $HOME/.gmixer...%b" "${yellow}" "${rescolor}"
generateConfFolder > /dev/null
printOkKo
printf "%bModify configuration file...%b" "${yellow}" "${rescolor}"
modifiyConfigurationFile > /dev/null
printOkKo
......@@ -735,31 +736,37 @@ main () {
mainVerbose () {
printf "\n%bUpdate system...%b" "${yellow}" "${rescolor}"
updateSystem
updateSystem && sleep 1
printOkKo
printf "%bInstallation of dependancies for installing python 3.7...%b" "${yellow}" "${rescolor}"
installDepPython
installDepPython && sleep 1
printOkKo
printf "%bBuild of python 3.7, this step may take time, don't hesitate to take a coffee...%b" "${yellow}" "${rescolor}"
installPython
checkInstallPython
checkInstallPython && sleep 1
printOkKo
printf "%bInstallation of dependancies for gmixer-py...%b" "${yellow}" "${rescolor}"
installDepGMixer
installDepGMixer && sleep 1
printOkKo
#for centos
#printf "\n%bInstallation of g++...%b\n" "${yellow}" "${rescolor}"
#sudo yum -y install gcc-c++
printf "%bBuild of cmake 3.14.3 (necessary for leveldb 1.21), this step may take time, don't hesitate to take a tea...%b" "${yellow}" "${rescolor}"
installOrBuildCmake
checkInstallCmake
installOrBuildCmake && sleep 1
checkInstallCmake && sleep 1
printOkKo
printf "%bBuild of leveldb 1.21, this step may take time, don't hesitate to take a beer....%b" "${yellow}" "${rescolor}"
buildLevelDB
checkBuildLevelDB
buildLevelDB && sleep 1
checkBuildLevelDB && sleep 1
printOkKo
printf "%bInstallation of python dependancies for gmixer...%b" "${yellow}" "${rescolor}"
installDepPythonForGMixer
installDepPythonForGMixer && sleep 1
printOkKo
printf "%bRetrieve project gmixer from gitlab...%b" "${yellow}" "${rescolor}"
getGmixerProject && sleep 1
printOkKo
printf "%bGenerate configuration folder : $HOME/.gmixer...%b" "${yellow}" "${rescolor}"
generateConfFolder && sleep 1
printOkKo
if [ ! -z "$parameterP" ] && [ "$parameterP" != "10951" ]
then
......@@ -783,36 +790,30 @@ mainVerbose () {
openPortGMixer 10951
printOkKo
fi
printf "%bRetrieve project gmixer from gitlab...%b" "${yellow}" "${rescolor}"
getGmixerProject
printOkKo
printf "%bGenerate configuration folder : $HOME/.gmixer...%b" "${yellow}" "${rescolor}"
generateConfFolder
printOkKo
printf "%bModify configuration file...%b" "${yellow}" "${rescolor}"
modifiyConfigurationFile
modifiyConfigurationFile && sleep 1
printOkKo
if test "$parameterT" = "2" || test "$parameterT" = "3"
then
printf "%bInstallation of Tor...%b" "${yellow}" "${rescolor}"
installationTor
checkTorInstallation
installationTor && sleep 1
checkTorInstallation && sleep 1
printOkKo
if test "$parameterT" = "3"
then
printf "%bConfiguration of tor...%b" "${yellow}" "${rescolor}"
configurationTor
configurationTor && sleep 1
printOkKo
printf "%bReload configuration...%b" "${yellow}" "${rescolor}"
sudo systemctl reload tor
sudo systemctl reload tor && sleep 1
noError="false"
checkCommand
checkCommand && sleep 1
printOkKo
fi
printf "%bRestart of tor...%b" "${yellow}" "${rescolor}"
sudo systemctl restart tor
sudo systemctl restart tor && sleep 1
noError="false"
checkCommand
checkCommand && sleep 1
printOkKo
if test "$parameterT" = "3"
then
......@@ -838,7 +839,7 @@ mainVerbose () {
password=$(generateRandomPass)
sed -i "s/\"id_salt\": \"\",/\"id_salt\": \"`echo $salt`\",/g" $HOME/.gmixer/config.json
sed -i "s/\"id_password\": \"\"/\"id_password\": \"`echo $password`\"/g" $HOME/.gmixer/config.json
checkCommand
checkCommand && sleep 1
printOkKo
else
......
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