1
0
Fork 0

Fix oasis setup

This commit is contained in:
Benoît Rouits 2020-05-29 12:31:46 +02:00
parent 3b714553a5
commit 5aea82090e
1 changed files with 5 additions and 3 deletions

View File

@ -100,15 +100,16 @@ After=network.target
[Service]
User=_USER_
ExecStart=/usr/local/bin/oasis --host $nodename --allow-host $nodename
ExecStart=/usr/local/bin/oasis --host _NODENAME_ --allow-host _NODENAME_
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
sed -i "s/_USER_/$USER/g" /tmp/oasis.service
sed -i "s/_NODENAME_/$nodename/g" /tmp/oasis.service
sudo cp -f /tmp/oasis.service /etc/systemd/system/
sudo sed -i "s/_USER_/$USER/g" /etc/systemd/system/oasis.service
echo "
_ __ __ _
@ -126,8 +127,9 @@ __)|_| \ \/ |_| \ || || |_ ... SCUTTLEBUTT ... OK?
'
echo "Launching oasis"
sudo systemctl daemon-reload || err "Restart OASIS"
sudo systemctl daemon-reload || err "Reload systemd"
sudo systemctl enable oasis || err "Enable OASIS daemon"
sudo systemctl start oasis || err "Start OASIS daemon"
echo " http://$nodename:3000 "
echo