Open gregjoeval opened 7 years ago
We could create a function that runs once at the start of the script to check if the database has been created, if not then it could run the "sudo apt-get install mysql-server python-mysqldb" line in the terminal. The script could also then enter the appropriate MySQL commands to create the Knightcard sign-in database.
This would probably a good resource: http://raspberrywebserver.com/sql-databases/using-mysql-on-a-raspberry-pi.html
Only problem I see is the script would also have to create a user with the correct permissions as well. Other than that, sounds good.
Might be smart to add the ability to set up a database for the first time use on a given device.