Commit a170d25f authored by Jondy Zhao's avatar Jondy Zhao

Use bin/slapos node format in the init-slapos-node.sh

parent 9edb5dd3
#! /bin/bash
cd /opt
if [[ -f /miniupnpc.tar.gz ]] ; then
tar xzf miniupnpc.tar.gz
mv $(ls miniupnpc-*) miniupnpc
cd /opt/miniupnpc
python setup.py install
if
cd /opt
if [[ -f /re6stnet.tar.gz ]] ; then
tar xzf re6stnet.tar.gz
mv $(ls re6stnet-*) re6stnet
else
git clone -b cygwin -n http://git.erp5.org/repos/re6stnet.git
if
cd /opt/re6stnet
python setup.py install
mkdir /etc/re6stnet
cd /etc/re6stnet
re6st-conf --registry http://re6st.example.com/
......@@ -28,7 +28,7 @@ function guid2name()
}
# Default node configure filename
cfilename=${1:/etc/opt/slapos/slapos.cfg}
cfilename=${1-/etc/opt/slapos/slapos.cfg}
if [[ ! -f $cfilename ]] ; then
echo "Error: no found configure file $cfilename, the computer "
......@@ -60,9 +60,9 @@ done
echo "re6stnet network OK."
# Run slapformat
/opt/slapos/bin/slapformat -c --now $cfilename || \
( echo "Error: initialize SlapOS Node failed."; exit 1 )
echo "run slapformat OK."
/opt/slapos/bin/slapos node format -cv --now || \
( echo "Initialize SlapOS Node failed."; exit 1 )
echo "Initialize SlapOS Node OK."
# Run slapproxy
/opt/slapos/bin/slapproxy || echo "Warning: start slapproxy failed"
/opt/slapos/bin/slapproxy || echo "Start slapproxy failed."
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