using Python Script to open the barrier gate to let person come out. and also flag the database server (using CakePHP) to know that person has already out, by tapping the ticket.
However this script is running background and auto-start when reboot.
Furthermore, I suggest to put the repository under /home/{user}/Documents/python/. Otherwise, you need to change file service.py (Line 18) in order to execute program properly.
content= "[Unit]\n ... \nExecStart=/usr/bin/python3 <path_to_main_python_file>"
In order to run background script, we need to create service first :
sudo make install
After installing the service, run it.
sudo make run
To remove the service, just input following command in terminal :
sudo make uninstall
sudo systemctl status epass.service