Clone onto your server and run ./installer.sh to install all dependencies and setup your apache2 server to serve the ADC site and API. Note that this will clobber any existing setup, and is meant only for fresh installations of Ubuntu Server 18.04.3, and may fail to run or damage system integrity if run on other operating systems or on modified versions. This tool is designed to have dependencies that are a subset of the ADC stack, to avoid installing additional dependencies that are not used by the final installation. The one exception to this rule is NodeJS (and by extension npm), which are installed to build ADCWeb but are not required to run it. If you don't plan to build the Web stack again on your server, feel free to remove those packages
If you're using this with ADC hardware, first of all don't do that because all of your default passwords will be public, and second of all the arrays to put the shared secret into the Arduino are stored in keys.txt
By default, the database installation has a user with credentials developer/developer and the following entries
- ADMIN
- admin1/admin1pass
- admin2/admin2pass
- STUDENTS
- user1/user1pass
- user2/user2pass (inactive)
- Two complaints
- DOORS
- D1
- D2
Want to test the API without the Web interface? Try SimpleClient for an easy way to query the API without graphics and minimal CSS or JS that can be run clientside.
installer.sh- Runs a full installation from start to finish, installing all dependencies, initializing database, patching apache2 configuration, generating keys and secrets, and installing ADC stack
setup.sql- A set of SQL commands that build the database, populate it with default values, and create the
developeruser
- A set of SQL commands that build the database, populate it with default values, and create the
apache2.conf.patch- A patch for apache2.conf that enables the use of .htaccess files
addDoor.sh- A script that generates a query to add a door to the database. If not supplied with MAC or hardware keys, it will generate them itself
- Some error checking using regex to ensure invalid values aren't inserted into the database
keygen.php- A PHP script that generates hardware secrets in the same way that they are later decoded by the API, to ensure compatibility of keys
keys.txt- A file that stores uint array representations of the hardware keys generated by
addDoor.sh - This one isn't actually in the repository anymore for obvious reasons, but will be autogenerated by
addDoor.shwhen needed
- A file that stores uint array representations of the hardware keys generated by