Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CONFLICT] socat SSB proxy #435

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/ssb/install
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Install dependencies
sudo apt-get install -y socat python-dev libtool python-setuptools autoconf automake
sudo apt-get install -y socat python-dev libtool python-setuptools autoconf automake socat

# Install node.js shared module
# shellcheck source=../shared/node.js/install
Expand All @@ -31,6 +31,8 @@ sudo systemctl start ssb.service
sudo cp "$BASE_DIR/ssb-broadcast-service.sh" "/usr/local/bin/ssb-broadcast-service.sh"
sudo cp "$BASE_DIR/ssb-broadcast.service" /etc/systemd/system/ssb-broadcast.service
sudo sed -i "s|__USER__|${currentUser}|g" /etc/systemd/system/ssb-broadcast.service
sudo cp "$BASE_DIR/ssb-ipv6-broadcast.service" "/etc/systemd/system/ssb-ipv6-broadcast.service"

sudo systemctl daemon-reload
sudo systemctl enable ssb-broadcast.service
sudo systemctl enable ssb-ipv6-broadcast.service
14 changes: 14 additions & 0 deletions scripts/ssb/ssb-ipv6-broadcast.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Scuttlebot (SSB) Service IPv6 Broadcast
Wants=network.target
After=ssb.service

[Service]
Type=simple
ExecStart=/usr/bin/socat -T 4 UDP6-LISTEN:8008,reuseaddr,fork,su=nobody UDP4:127.0.0.1:8008
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=on-failure
RestartSec=10s

[Install]
WantedBy=multi-user.target