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

[Feature] Easy Network shares discovery #292

Merged
merged 1 commit into from
Dec 13, 2024
Merged
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
Add wsdd-native
WS-Discovery protocol implementation:
a Unix daemon that makes your Linux machine visible in Network view of Windows Explorer on newer versions of Windows.

https://github.com/gershnik/wsdd-native

command line optins:
https://github.com/gershnik/wsdd-native/blob/master/doc/wsddn.8.md
  • Loading branch information
cizia64 committed Dec 13, 2024
commit c528680305e4b6d42bbf26b48df74db5aa2b208b
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ mkdir -p /var/cache/samba /var/log/samba /var/lock/subsys /var/run/samba /var/ru
sync
sleep 0.3

wsddn --user root --unixd --smb-conf /mnt/SDCARD/System/etc/samba --log-level 0
smbd -s ${CONFIGFILE} -D
nmbd -D --configfile="${CONFIGFILE}"

# we modify the DB entries to reflect the current state
/mnt/SDCARD/System/usr/trimui/scripts/mainui_state_update.sh "SMB" "enabled"


sleep 1
IP=$(ip route get 1 2>/dev/null | awk '{print $NF;exit}')
echo "SMB: \\\\$IP"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ mkdir -p /var/cache/samba /var/log/samba /var/lock/subsys /var/run/samba /var/ru
sync
sleep 0.3

wsddn --user root --unixd --smb-conf /mnt/SDCARD/System/etc/samba --log-level 0
smbd -s ${CONFIGFILE} -D
nmbd -D --configfile="${CONFIGFILE}"
echo -e "trimui\ntrimui\n" | smbpasswd -s -a root -c ${CONFIGFILE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fi

/mnt/SDCARD/System/bin/jq '. += {"SMB": 0}' "$json_file" >"/tmp/json_file.tmp" && mv "/tmp/json_file.tmp" "$json_file"

kill -9 $(pidof wsddn)
kill -9 $(pidof smbd)
kill -9 $(pidof nmbd)

Expand Down
Binary file added System/bin/wsddn
Binary file not shown.
2 changes: 2 additions & 0 deletions System/starts/°customization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,5 @@ fi

# Apply current led configuration
/mnt/SDCARD/System/etc/led_config.sh &

hostname "TSP"
2 changes: 1 addition & 1 deletion System/starts/°post_starts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ if [ "$smb_enabled" -eq 1 ]; then
CONFIGFILE="/mnt/SDCARD/System/etc/samba/smb.conf"
fi

wsddn --user root --unixd --smb-conf /mnt/SDCARD/System/etc/samba --log-level 0
smbd -s ${CONFIGFILE} -D
nmbd -D --configfile="${CONFIGFILE}"

Expand All @@ -47,7 +48,6 @@ if [ "$Tailscale_enabled" -eq 1 ]; then
/mnt/SDCARD/System/bin/tailscaled --state="/mnt/SDCARD/System/etc/tailscale/tailscaled.state" &
fi


VNC_wait_for_MainUI() {
timeout=10
elapsed=0
Expand Down