Change scuttlebot hostname on network restart

This commit is contained in:
Bob Mottram 2017-12-16 18:01:59 +00:00
parent 05df6f5f13
commit 0653eae160
2 changed files with 5 additions and 1 deletions

View File

@ -1302,7 +1302,7 @@ function initialise_scuttlebot_pub {
fi
echo '{' > /etc/scuttlebot/.ssb/config
echo " \"host\": \"${HOSTNAME}\"," >> /etc/scuttlebot/.ssb/config
echo " \"host\": \"$P{PEER_ID}.local\"," >> /etc/scuttlebot/.ssb/config
echo " \"port\": ${SCUTTLEBOT_PORT}," >> /etc/scuttlebot/.ssb/config
echo ' "allowPrivate": true,' >> /etc/scuttlebot/.ssb/config
echo ' "timeout": 30000,' >> /etc/scuttlebot/.ssb/config
@ -1330,6 +1330,7 @@ function initialise_scuttlebot_pub {
ln -s /etc/nginx/sites-available/git_ssb /etc/nginx/sites-enabled/git_ssb
systemctl enable git_ssb.service
systemctl start git_ssb.service
fi
}

View File

@ -507,6 +507,9 @@ function start {
systemctl disable tor
fi
sed -i "s|\"host\":.*|\"host\": \"${HOSTNAME}.local\",|g" /etc/scuttlebot/.ssb/config
systemctl restart scuttlebot
verify
}