Skip to content
Open
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
6 changes: 4 additions & 2 deletions automount-usb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ fi

runuser userplaceholder -s /bin/bash -c "udisksctl mount -b /dev/${PART} --no-user-interaction"

MOUNTPOINT=`lsblk /dev/${PART} -o MOUNTPOINTS -n`

if [ -f /usr/local/bin/ps3netsrv++ ]; then
pkill ps3netsrv++
/usr/local/bin/ps3netsrv++ -d /media/userplaceholder/$UUID
/usr/local/bin/ps3netsrv++ -d ${MOUNTPOINT}
fi

#create a new smb share for the mounted drive
Expand All @@ -108,7 +110,7 @@ map to guest = bad user
allow insecure wide links = yes
[share]
Comment = default shared folder
Path = /media/userplaceholder/$UUID
Path = ${MOUNTPOINT}
Browseable = yes
Writeable = Yes
only guest = no
Expand Down