Change scuttlebot hostname on network restart
This commit is contained in:
parent
05df6f5f13
commit
0653eae160
|
@ -1302,7 +1302,7 @@ function initialise_scuttlebot_pub {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo '{' > /etc/scuttlebot/.ssb/config
|
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 " \"port\": ${SCUTTLEBOT_PORT}," >> /etc/scuttlebot/.ssb/config
|
||||||
echo ' "allowPrivate": true,' >> /etc/scuttlebot/.ssb/config
|
echo ' "allowPrivate": true,' >> /etc/scuttlebot/.ssb/config
|
||||||
echo ' "timeout": 30000,' >> /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
|
ln -s /etc/nginx/sites-available/git_ssb /etc/nginx/sites-enabled/git_ssb
|
||||||
systemctl enable git_ssb.service
|
systemctl enable git_ssb.service
|
||||||
systemctl start git_ssb.service
|
systemctl start git_ssb.service
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -507,6 +507,9 @@ function start {
|
||||||
systemctl disable tor
|
systemctl disable tor
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
sed -i "s|\"host\":.*|\"host\": \"${HOSTNAME}.local\",|g" /etc/scuttlebot/.ssb/config
|
||||||
|
systemctl restart scuttlebot
|
||||||
|
|
||||||
verify
|
verify
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue