forked from finn/tinyboard
add spoke registry, per-spoke crontab, and offboard-spoke.sh
This commit is contained in:
@@ -251,19 +251,6 @@ mkdir -p "$MOUNT_POINT"
|
||||
chown "$HUB_USER":"$HUB_USER" "$MOUNT_POINT"
|
||||
info "Mount point created at $MOUNT_POINT."
|
||||
|
||||
header "Crontab Setup"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
HELPER="$SCRIPT_DIR/../hubspoke-helper.sh"
|
||||
CRON_LINE="@reboot $HELPER hub start-background"
|
||||
EXISTING=$(crontab -u "$HUB_USER" -l 2>/dev/null || true)
|
||||
|
||||
if echo "$EXISTING" | grep -qF "hub start-background"; then
|
||||
warn "Crontab entry already exists, skipping."
|
||||
else
|
||||
(echo "$EXISTING"; echo "$CRON_LINE") | crontab -u "$HUB_USER" -
|
||||
info "Added @reboot crontab entry for rclone mount."
|
||||
fi
|
||||
|
||||
header "Hub Setup Complete"
|
||||
echo -e " Hub user: ${GREEN}$HUB_USER${NC}"
|
||||
echo -e " SSH config: ${GREEN}GatewayPorts yes, AllowTcpForwarding yes${NC}"
|
||||
|
||||
Reference in New Issue
Block a user