I am looking for an update mechanism. How can I detect on linux that a generic usb stick has been plugged in and check if there is special file on it (e.g. control_update.txt)? If this file is detected, a script should be executed to just copy the binary and library file and the other files (html, php, js, ...) from the USB Stick to the Linux system, using a bash script.
I found this question and answer: Bash script to detect when my USB is plugged in and to then sync it with a Directory. Does this mean that by using these commands I will have access to usb, and It will directly execute a script, so the only thing I need is to write the script to execute?
I suppose this will be the way to search for a file, and cat would be used to copy update files..
if [ -f print_control.txt ]; then
echo "File found!"
cp
fi