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

Diskplayer.contents not moving to floppy disk #1

Open
drezelrs opened this issue Jan 22, 2022 · 1 comment
Open

Diskplayer.contents not moving to floppy disk #1

drezelrs opened this issue Jan 22, 2022 · 1 comment

Comments

@drezelrs
Copy link

drezelrs commented Jan 22, 2022

When accessing the virtual host at http://RASPPI IP/diskplayer/ I try to write a spotify album URL to the floppy and it properly writes the diskplayer.contents file into tmp, but it doesn't properly move the file to the floppy disk.

My floppy drive mounts to /media/pi/Floppy Disk/
not sure if there's a way to change it to /media/floppy/

Here is my copyfiles.sh code:

#!/bin/sh
# /etc/init.d/copyfiles.sh
### BEGIN INIT INFO
# Provides:          copyfiles.sh
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Copies file to the floppy
# Description:       Copies specific file from tmp folder to the mounted floppy once created
### END INIT INFO

inotifywait -m /home/pi/diskplayer/tmp -e create @__init__.py |
    while read path action file; do
        if [ "$file" = "diskplayer.contents" ]; then
            sudo chown root:root "${path}/${file}"
            sudo chmod 777 "${path}/${file}"
            sudo mv "${path}/${file}" /media/pi/Floppy Disk/diskplayer.contents
        fi
    done
@drezelrs drezelrs reopened this Jan 22, 2022
@drezelrs drezelrs changed the title Error when recording to floppy disk Diskplayer.contents not moving to floppy disk Jan 22, 2022
@c-ancia
Copy link
Owner

c-ancia commented Jan 31, 2022

Hi @drezelrs ,

Not sure how to solve this one as I don't know how to replicate your problem unfortunately.

It does sound like a permission issue though. Are you using root or an admin user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants