Glad you seemed to have fixed it. What was the trick?
Just to tie up some other loose ends...
- The shutdown command is the way to go. It will first try to stop all processes politely and then if they don't shutdown in a reasonable time, it will kill them with extreme prejudice. Use "sudo shutdown -h now" to stop the RPi, "sudo shutdown -r now" to reboot.
- Since QnetGateway programs run at root privilege, a database locked message may indicate that there might be a hardware problem, like a bad SD card. SD memory is definitely the Achilles heal of the Raspberry Pi.
- QnetGateway uses systemd. You have complete control over what it does and how it starts things. The systemctl command is your tool for controlling systemd. Most systemctl commands require root privileges. There are many articles on the Web on how to manage systemd using systemctl, like . After reading this article, see how much you understand of the install and uninstall sections of QnetGateway's Makefile.
As an example, you could stop your system without uninstalling it with:
sudo systemctl stop qngateway && sudo systemctl stop qnlink && sudo systemctl stop qnitap
or whatever module you are using. Note that this won't stop these programs from restarting on a reboot.
Then you could remove the database file and make sure it's gone:
sudo rm -f /usr/local/etc/qn.db && ls -l /usr/local/etc/qn.dbThen you would restart everything:
sudo systemctl restart qngateway && sudo systemctl restart qnlink && sudo systemctl restart qnitapNote that the && is a bash feature that says, "if the previous command was successful, then execute the following command".