I have some kind of a kiosk Ubuntu set up based on Ubuntu Server 14.0.2 which runs an application on chrome. The kiosk has no internet connection thus the updates to the application should be done manually. I want the update process to be as easy as possible so what I want to present to the end-user is the ability to simply plug to the PC a USB drive and the USB drive will be automatically detected and will attempt to run a certain file. For example, I plug a USB drive and Ubuntu Server tries to find a
update-2.3.sh file and execute it. That
update-2.3.sh file is just a file that will run some commands and swap files from the USB to Hard Drive resulting in new code. I guess this should be ran with administrator privileges or maybe just setting the code directory to
777 should be enough?
An example of files in the USB drive:
├───update-2.3.sh ├───/updates | └───file1.php | └───file2.php └───/sub └───another.php
update-2.3.sh file will run certain commands such as
mv to override existing files (there is a folder `~/code/app/updates) and some commands as admin:
sudo stop kiosk (sudo?) mv updates ~/code/app/ sudo start kiosk
* haven't tested that
mv command, I hope it works
Is that possible doing such a thing?