Commit 0a690680 authored by Jean-Baptiste Petre's avatar Jean-Baptiste Petre

clean install re6stnet

parent f36b05a5
...@@ -2,46 +2,19 @@ ...@@ -2,46 +2,19 @@
echo "install babel" echo "install babel"
# extraction and deplacement rename in babeld # detect version
FILE=/root/babeld-1.3.4.tar.gz KERN=$(uname -m)
if [ -e $FILE ];then
echo "babeld-1.3.4.tar.gz already exists"
elif wget http://heberge-hd.net/slapos/babeld-1.3.4.tar.gz; then
echo "downlaod done"
else
wget http://pkgs.fedoraproject.org/repo/pkgs/babeld/babeld-1.3.4.tar.gz/37be1cbcc23cd00ee47efc9157c58795/babeld-1.3.4.tar.gz
fi
#dependance
zypper install python-pyOpenSSL
FILE=/root/babeld wget http://git.erp5.org/dist/rpm/$KERN/python-miniupnpc-1.7-89.g0c0129d.x86_64.rpm
if [ -e $FILE ];then wget http://git.erp5.org/dist/rpm/$KERN/babeld-1.3.3-17.ge097312.x86_64.rpm
echo "already decompress" whet http://git.erp5.org/dist/rpm/noarch/re6stnet-0-281.gb395299.noarch.rpm
cd /root/babeld
else
tar -zvxf babeld-1.3.4.tar.gz && mv babeld-1.3.4 babeld && cd /root/babeld
fi
# make and make install
FILE=/usr/local/bin/babeld
if [ -e $FILE ]; then
echo "babeld is already installed"
else
make
sleep 3
su -c 'make install'
fi
echo "download" rpm -iv python-miniupnpc-1.7-89.g0c0129d.x86_64.rpm
FILE=/usr/src/re6stnet rpm -iv babeld-1.3.3-17.ge097312.x86_64.rpm
if [ -e $FILE ]; then rpm -iv re6stnet-0-281.gb395299.noarch.rpm
echo "git pull update"
cd /usr/src/re6stnet && git pull --rebase origin master
echo "done"
else
echo "the file does not exist"
cd /usr/src && git clone http://git.erp5.org/repos/re6stnet.git
echo "file exists now and download restnet"
fi
echo "file creation in re6stnet /etc/" echo "file creation in re6stnet /etc/"
FILE=/etc/re6stnet FILE=/etc/re6stnet
...@@ -53,13 +26,18 @@ else ...@@ -53,13 +26,18 @@ else
echo "done" echo "done"
fi fi
echo "systemed enable and starting service"
systemctl --system daemon-reload
systemctl enable re6stnet.service
systemctl start re6stnet.service
echo "sign in anonymous" echo "sign in anonymous"
FILE=/etc/re6stnet/ca.crt FILE=/etc/re6stnet/ca.crt
if [ -e $FILE ]; then if [ -e $FILE ]; then
echo "the file already exists" echo "the file already exists"
else else
cd /etc/re6stnet cd /etc/re6stnet
/usr/src/re6stnet/re6st-conf --registry http://re6stnet.nexedi.com/ --anonymous -r title "SlapOS Node" re6st-conf --registry http://re6stnet.nexedi.com/ --anonymous -r title "SlapOS Node" -d /etc/re6stnet/
echo 'recording made' echo 'recording made'
fi fi
...@@ -67,6 +45,7 @@ echo "write config file re6stnet.conf" ...@@ -67,6 +45,7 @@ echo "write config file re6stnet.conf"
FILE=/etc/re6stnet/re6stnet.conf FILE=/etc/re6stnet/re6stnet.conf
if [ -e $FILE ]; then if [ -e $FILE ]; then
echo "file exists" echo "file exists"
echo "table 0" > /etc/re6stnet/re6stnet.conf
else else
echo "registry http://re6stnet.nexedi.com/ echo "registry http://re6stnet.nexedi.com/
ca ca.crt ca ca.crt
...@@ -81,31 +60,6 @@ O1" >> /etc/re6stnet/re6stnet.conf ...@@ -81,31 +60,6 @@ O1" >> /etc/re6stnet/re6stnet.conf
echo "the file created" echo "the file created"
fi fi
echo "write systemd unite"
FILE=/etc/systemd/system/re6stnet.service
if [ -e $FILE ]; then
echo "file exists"
else
echo "[Unit]
Description=Nexedi re6st network
[Service]
Type=simple
WorkingDirectory=/etc/re6stnet
ExecStart=/usr/src/re6stnet/re6stnet @re6stnet.conf
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target" >> /etc/systemd/system/re6stnet.service
echo "the file is create"
fi
echo "systemed enable and starting service"
systemctl --system daemon-reload
systemctl enable re6stnet.service
systemctl start re6stnet.service
sleep 50 sleep 50
echo "sleep 50" echo "sleep 50"
echo "ping6 start go, option -c5" echo "ping6 start go, option -c5"
......
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