forked from axiom-team/astroport
Confgure a systemd service for OASIS
This commit is contained in:
parent
c9f9873642
commit
3b714553a5
|
@ -92,11 +92,24 @@ scuttlebutt() {
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat > ~/.zen/launch-oasis.sh <<EOF
|
echo "CREATE SYSTEMD oasis SERVICE >>>>>>>>>>>>>>>>>>"
|
||||||
#!/bin/bash
|
cat > /tmp/oasis.service <<EOF
|
||||||
oasis --allow-host $nodename --host $nodename
|
[Unit]
|
||||||
|
Description=OASIS Scuttlebutt Gateway
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=_USER_
|
||||||
|
ExecStart=/usr/local/bin/oasis --host $nodename --allow-host $nodename
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
sudo cp -f /tmp/oasis.service /etc/systemd/system/
|
||||||
|
sudo sed -i "s/_USER_/$USER/g" /etc/systemd/system/oasis.service
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
_ __ __ _
|
_ __ __ _
|
||||||
_ _ .__|_o _ (_ (_ |_)
|
_ _ .__|_o _ (_ (_ |_)
|
||||||
|
@ -112,13 +125,13 @@ __)|_| \ \/ |_| \ || || |_ ... SCUTTLEBUTT ... OK?
|
||||||
|
|
||||||
'
|
'
|
||||||
echo "Launching oasis"
|
echo "Launching oasis"
|
||||||
oasis --allow-host $nodename --host $nodename &
|
|
||||||
|
sudo systemctl daemon-reload || err "Restart OASIS"
|
||||||
|
sudo systemctl enable oasis || err "Enable OASIS daemon"
|
||||||
|
|
||||||
echo " http://$nodename:3000 "
|
echo " http://$nodename:3000 "
|
||||||
echo
|
echo
|
||||||
echo "ADD ~/.zen/launch-oasis.sh TO YOUR '/etc/rc.local' !!! Or use patchwork. "
|
|
||||||
sleep $((1 + RANDOM % 5))
|
sleep $((1 + RANDOM % 5))
|
||||||
echo "LAUNCHING OASIS NODE MANAGER http://$nodename:3000"
|
|
||||||
|
|
||||||
echo "IF YOU ARE A PUB consider protect it behind password nginx redirect !!!"
|
echo "IF YOU ARE A PUB consider protect it behind password nginx redirect !!!"
|
||||||
|
|
||||||
echo "3 seconds before ssb_INIT.sh..."
|
echo "3 seconds before ssb_INIT.sh..."
|
||||||
|
|
Loading…
Reference in New Issue