Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ĞMixer-py
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pascal Engélibert
ĞMixer-py
Commits
fe4fd7e5
Commit
fe4fd7e5
authored
6 years ago
by
mlsuyt2718
Browse files
Options
Downloads
Patches
Plain Diff
add libssl-dev in package installation (required for scrypt package) + correct path for python3.7
parent
1402e3c7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
install_gmixer.sh
+37
-36
37 additions, 36 deletions
install_gmixer.sh
with
37 additions
and
36 deletions
install_gmixer.sh
+
37
−
36
View file @
fe4fd7e5
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
# contact mail : <pytlin@protonmail.com>
# contact mail : <pytlin@protonmail.com>
VERSION
=
"2019.05.04"
VERSION
=
"2019.05.04"
set
-e
set
-e
...
@@ -168,13 +169,13 @@ generateConfFolder () {
...
@@ -168,13 +169,13 @@ 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
$HOME
/gmixer-py/
python3.7
server.py
-i
$(
which python3.7
)
$HOME
/gmixer-py/server.py
-i
checkCommand
checkCommand
elif
[
"
$OS
"
=
"CentOS Linux"
]
;
then
elif
[
"
$OS
"
=
"CentOS Linux"
]
;
then
$HOME
/gmixer-py/
python3.6
server.py
-i
$(
which python3.6
)
$HOME
/gmixer-py/server.py
-i
checkCommand
checkCommand
else
else
$HOME
/gmixer-py/
python3.7
server.py
-i
$(
which python3.7
)
$HOME
/gmixer-py/server.py
-i
checkCommand
checkCommand
fi
fi
else
else
...
@@ -225,10 +226,10 @@ updateSystem () {
...
@@ -225,10 +226,10 @@ updateSystem () {
installDepPython
()
{
installDepPython
()
{
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
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
checkCommand
elif
[
"
$OS
"
=
"CentOS Linux"
]
;
then
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
checkCommand
else
else
printf
"
\n
%bdistribution not yet supported...%b
\n
"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"
\n
%bdistribution not yet supported...%b
\n
"
"
${
yellow
}
"
"
${
rescolor
}
"
...
@@ -239,7 +240,7 @@ installDepPython () {
...
@@ -239,7 +240,7 @@ installDepPython () {
installDepPythonForGMixer
()
{
installDepPythonForGMixer
()
{
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
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
--upgrade
pip 2> /dev/null
sudo
pip3
install
libnacl duniterpy silkaj py-ubjson plyvel PySocks 2> /dev/null
sudo
pip3
install
libnacl duniterpy silkaj py-ubjson plyvel PySocks 2> /dev/null
checkCommand
checkCommand
...
@@ -642,6 +643,12 @@ main () {
...
@@ -642,6 +643,12 @@ main () {
printf
"%bInstallation of python dependancies for gmixer...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"%bInstallation of python dependancies for gmixer...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
installDepPythonForGMixer
>
/dev/null
installDepPythonForGMixer
>
/dev/null
printOkKo
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"
]
if
[
!
-z
"
$parameterP
"
]
&&
[
"
$parameterP
"
!=
"10951"
]
then
then
portUse1
=
$(
sudo
lsof
-i
-P
-n
|
grep
LISTEN |
grep
$parameterP
|
wc
-l
)
portUse1
=
$(
sudo
lsof
-i
-P
-n
|
grep
LISTEN |
grep
$parameterP
|
wc
-l
)
...
@@ -664,12 +671,6 @@ main () {
...
@@ -664,12 +671,6 @@ main () {
openPortGMixer 10951
openPortGMixer 10951
printOkKo
printOkKo
fi
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
}
"
printf
"%bModify configuration file...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
modifiyConfigurationFile
>
/dev/null
modifiyConfigurationFile
>
/dev/null
printOkKo
printOkKo
...
@@ -735,31 +736,37 @@ main () {
...
@@ -735,31 +736,37 @@ main () {
mainVerbose
()
{
mainVerbose
()
{
printf
"
\n
%bUpdate system...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"
\n
%bUpdate system...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
updateSystem
updateSystem
&&
sleep
1
printOkKo
printOkKo
printf
"%bInstallation of dependancies for installing python 3.7...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"%bInstallation of dependancies for installing python 3.7...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
installDepPython
installDepPython
&&
sleep
1
printOkKo
printOkKo
printf
"%bBuild of python 3.7, this step may take time, don't hesitate to take a coffee...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"%bBuild of python 3.7, this step may take time, don't hesitate to take a coffee...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
installPython
installPython
checkInstallPython
checkInstallPython
&&
sleep
1
printOkKo
printOkKo
printf
"%bInstallation of dependancies for gmixer-py...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"%bInstallation of dependancies for gmixer-py...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
installDepGMixer
installDepGMixer
&&
sleep
1
printOkKo
printOkKo
#for centos
#for centos
#printf "\n%bInstallation of g++...%b\n" "${yellow}" "${rescolor}"
#printf "\n%bInstallation of g++...%b\n" "${yellow}" "${rescolor}"
#sudo yum -y install gcc-c++
#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
}
"
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
installOrBuildCmake
&&
sleep
1
checkInstallCmake
checkInstallCmake
&&
sleep
1
printOkKo
printOkKo
printf
"%bBuild of leveldb 1.21, this step may take time, don't hesitate to take a beer....%b"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"%bBuild of leveldb 1.21, this step may take time, don't hesitate to take a beer....%b"
"
${
yellow
}
"
"
${
rescolor
}
"
buildLevelDB
buildLevelDB
&&
sleep
1
checkBuildLevelDB
checkBuildLevelDB
&&
sleep
1
printOkKo
printOkKo
printf
"%bInstallation of python dependancies for gmixer...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
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
printOkKo
if
[
!
-z
"
$parameterP
"
]
&&
[
"
$parameterP
"
!=
"10951"
]
if
[
!
-z
"
$parameterP
"
]
&&
[
"
$parameterP
"
!=
"10951"
]
then
then
...
@@ -783,36 +790,30 @@ mainVerbose () {
...
@@ -783,36 +790,30 @@ mainVerbose () {
openPortGMixer 10951
openPortGMixer 10951
printOkKo
printOkKo
fi
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
}
"
printf
"%bModify configuration file...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
modifiyConfigurationFile
modifiyConfigurationFile
&&
sleep
1
printOkKo
printOkKo
if
test
"
$parameterT
"
=
"2"
||
test
"
$parameterT
"
=
"3"
if
test
"
$parameterT
"
=
"2"
||
test
"
$parameterT
"
=
"3"
then
then
printf
"%bInstallation of Tor...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"%bInstallation of Tor...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
installationTor
installationTor
&&
sleep
1
checkTorInstallation
checkTorInstallation
&&
sleep
1
printOkKo
printOkKo
if
test
"
$parameterT
"
=
"3"
if
test
"
$parameterT
"
=
"3"
then
then
printf
"%bConfiguration of tor...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"%bConfiguration of tor...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
configurationTor
configurationTor
&&
sleep
1
printOkKo
printOkKo
printf
"%bReload configuration...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"%bReload configuration...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
sudo
systemctl reload tor
sudo
systemctl reload tor
&&
sleep
1
noError
=
"false"
noError
=
"false"
checkCommand
checkCommand
&&
sleep
1
printOkKo
printOkKo
fi
fi
printf
"%bRestart of tor...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
printf
"%bRestart of tor...%b"
"
${
yellow
}
"
"
${
rescolor
}
"
sudo
systemctl restart tor
sudo
systemctl restart tor
&&
sleep
1
noError
=
"false"
noError
=
"false"
checkCommand
checkCommand
&&
sleep
1
printOkKo
printOkKo
if
test
"
$parameterT
"
=
"3"
if
test
"
$parameterT
"
=
"3"
then
then
...
@@ -838,7 +839,7 @@ mainVerbose () {
...
@@ -838,7 +839,7 @@ mainVerbose () {
password
=
$(
generateRandomPass
)
password
=
$(
generateRandomPass
)
sed
-i
"s/
\"
id_salt
\"
:
\"\"
,/
\"
id_salt
\"
:
\"
`
echo
$salt
`
\"
,/g"
$HOME
/.gmixer/config.json
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
sed
-i
"s/
\"
id_password
\"
:
\"\"
/
\"
id_password
\"
:
\"
`
echo
$password
`
\"
/g"
$HOME
/.gmixer/config.json
checkCommand
checkCommand
&&
sleep
1
printOkKo
printOkKo
else
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment