Commit 448c0ab9 authored by Joanne Hugé's avatar Joanne Hugé

Reorganize scripts, move some scripts to playbook

parent c91b45f2
#!/bin/bash
SLAPOS_CFG_FILE="/etc/opt/slapos/slapos.cfg"
mkdir -p /opt/amarisoft/.amarisoft && cp -r ~/.amarisoft/* /opt/amarisoft/.amarisoft/;
ip -6 a show dev lo | grep "::1/" | grep 2001 || bash /root/re6st;
stat $SLAPOS_CFG_FILE || slapos node || bash /root/slapos;
grep -q "create_tun" $SLAPOS_CFG_FILE || sed -i 's/create_tap = False/create_tap = False\ncreate_tun = True/g' $SLAPOS_CFG_FILE;
sed -i 's/partition_amount.*/partition_amount = 20/g' /etc/opt/slapos/slapos.cfg;
ip l show dev slaptun0 || slapos node format --now;
#!/bin/bash
cd slapos.package/playbook;
ansible-playbook -i hosts ors.yml;
ansible-playbook -i hosts ors-upgrade.yml
#!/bin/bash
cd slapos.package/playbook;
ansible-playbook -i hosts ors.yml;
ansible-playbook -i hosts ors-upgrade.yml;
# Don't run re6st with interface option to avoid networks merging while in Lille Office
CONF="/etc/re6stnet/re6stnet.conf"
IFACE="$(ip route | grep default | sed 's/.*dev \(\w*\)\( .*$\|$\)/\1/g')"
sed -i '/^interface/d' $CONF
systemctl restart re6stnet;
#!/bin/bash
CONF="/etc/re6stnet/re6stnet.conf"
IFACE="$(ip route | grep default | sed 's/.*dev \(\w*\)\( .*$\|$\)/\1/g')"
sed -i '/^interface/d' $CONF
echo "interface $IFACE" >> $CONF
if ! ps -ax -o cmd | grep babeld | grep -q $IFACE; then
systemctl restart re6stnet;
fi
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