Commit 88aed692 authored by Jondy Zhao's avatar Jondy Zhao

slapos-configure: download miniupnpc and pyOpenSSL if required

parent 80ebe837
...@@ -148,7 +148,9 @@ function configure_section_re6stnet() ...@@ -148,7 +148,9 @@ function configure_section_re6stnet()
csih_inform "checking miniupnpc ..." csih_inform "checking miniupnpc ..."
if [[ ! -d /opt/miniupnpc ]] ; then if [[ ! -d /opt/miniupnpc ]] ; then
_filename=/opt/downloads/miniupnpc.tar.gz _filename=/opt/downloads/miniupnpc.tar.gz
[[ -r ${_filename} ]] || csih_error "No package found: ${_filename}" [[ -r ${_filename} ]] ||
wget -c http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.8.tar.gz -O ${_filename} ||
csih_error "No package found: ${_filename}"
csih_inform "installing miniupnpc ..." csih_inform "installing miniupnpc ..."
cd /opt cd /opt
tar xzf ${_filename} --no-same-owner tar xzf ${_filename} --no-same-owner
...@@ -164,7 +166,9 @@ function configure_section_re6stnet() ...@@ -164,7 +166,9 @@ function configure_section_re6stnet()
csih_inform "checking pyOpenSSL ..." csih_inform "checking pyOpenSSL ..."
if [[ ! -d /opt/pyOpenSSL ]] ; then if [[ ! -d /opt/pyOpenSSL ]] ; then
_filename=/opt/downloads/pyOpenSSL.tar.gz _filename=/opt/downloads/pyOpenSSL.tar.gz
[[ -r ${_filename} ]] || csih_error "No package found: ${_filename}" [[ -r ${_filename} ]] ||
wget -c --no-check-certificate https://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.13.tar.gz#md5=767bca18a71178ca353dff9e10941929 -O ${_filename} ||
csih_error "No package found: ${_filename}"
csih_inform "installing pyOpenSSL ..." csih_inform "installing pyOpenSSL ..."
cd /opt cd /opt
tar xzf ${_filename} --no-same-owner tar xzf ${_filename} --no-same-owner
...@@ -603,6 +607,8 @@ function remove_configure_items() ...@@ -603,6 +607,8 @@ function remove_configure_items()
rm -rf /opt/miniupnpc && echo "OK" rm -rf /opt/miniupnpc && echo "OK"
csih_inform "Remove /opt/pyOpenSSL" csih_inform "Remove /opt/pyOpenSSL"
rm -rf /opt/pyOpenSSL && echo "OK" rm -rf /opt/pyOpenSSL && echo "OK"
csih_inform "Remove /opt/re6stnet"
rm -rf /opt/re6stnet && echo "OK"
csih_inform "Remove /etc/re6stnet" csih_inform "Remove /etc/re6stnet"
rm -rf /etc/re6stnet && echo "OK" rm -rf /etc/re6stnet && echo "OK"
......
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