Public
Snippet $236 authored by Rafael Monnerat

migrate_to_grandenet.sh

Edited
ifconfig lo

read -p "Continue? (Press enter)"
read -p "Enter current network: " cnetwork

service re6stnet stop
sleep 3
ps aux | grep babel


read -p "Continue? (Press enter)"
mv /etc/re6stnet /etc/re6stnet.backup
mkdir -p /etc/re6stnet

wget deploy.erp5.net/gnet/re6st -O re6st
bash re6st

sleep 10
ifconfig lo

read -p "Continue? (Press enter)"

read -p "enter network : " network

echo $network 

cp /opt/slapos/slapos.xml /opt/slapos/slapos.xml.backup.`date +"%Y%M%d%H%m%s"`

sed -i "s/$cnetwork/$network/g" /opt/slapos/slapos.xml

grep $network /opt/slapos/slapos.xml

read -p "Continue? (Press enter)"

slapos node format --now
slapos node instance --all

slapos node bang -m "Re6stnet upgraded to grandenet"