This commit is contained in:
qo-op 2020-03-23 20:38:06 +01:00
parent 3129425607
commit 98f844c5de
1 changed files with 6 additions and 5 deletions

View File

@ -37,10 +37,10 @@ scuttlebutt() {
# Create config (TODO: adapt if public Pub or Local Node)
nodename=$(cat /etc/hostname)
extension=$($(echo $nodename | cut -d '.' -f 2))
extension=$(echo $nodename | cut -d '.' -f 2)
if [[ $extension == "" ]]; then
nodename=$(echo $nodename).home
nodename=$nodename.home
# LOCAL
cat > ~/.ssb/config <<EOF
@ -85,11 +85,12 @@ EOF
currentUser=$USER
# Copy SYSTEMD service to correct location
sudo cp "$BASE_DIR/ssb.service" /tmp/ssb.service
cp "$BASE_DIR/ssb.service" /tmp/ssb.service
# Copy repplace __USER__ place holder to current user
sudo sed -i "s|__USER__|${currentUser}|g" /tmp/ssb.service
sudo sed -i "s|__SSBSERVER__|${ssbSERVER}|g" /tmp/ssb.service
sed -i "s|__USER__|${currentUser}|g" /tmp/ssb.service
sed -i "s|__SSBSERVER__|${ssbSERVER}|g" /tmp/ssb.service
echo -e "${c_yellow}Installing ssb.service...$c_"
sudo mv /tmp/ssb.service /etc/systemd/system/ssb.service
# Reload, Enable and start SSB Service