amnezia-client/client/server_scripts/check_server_is_busy.sh
pokamest ba3ef98d1e
Fix for server busy check (#287)
Fix for server busy check
2023-08-16 16:08:08 +01:00

5 lines
391 B
Bash

if which apt-get > /dev/null 2>&1; then LOCK_FILE="/var/lib/dpkg/lock-frontend";\
elif which dnf > /dev/null 2>&1; then LOCK_FILE="/var/run/dnf.pid";\
elif which yum > /dev/null 2>&1; then LOCK_FILE="/var/run/yum.pid";\
else echo "Packet manager not found"; echo "Internal error"; exit 1; fi;\
if command -v fuser > /dev/null 2>&1; then sudo fuser $LOCK_FILE; else echo "Not installed"; fi