Lodestone-Team / lodestone_core

The backend for Lodestone, A free, open source server hosting tool for Minecraft and other multiplayers
https://www.lodestone.cc/
GNU Affero General Public License v3.0
59 stars 7 forks source link

Ensure only one instance of core is running at the same time #173

Open CheatCod opened 1 year ago

CheatCod commented 1 year ago

Add a lock file in a standard place and try to acquire it before starting, if we fail to acquire the lock, return an error.

Make sure the file is unlocked when the process exit