2023-08-16 08:08:08 -07:00
|
|
|
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";\
|
2024-01-11 00:15:14 +04:00
|
|
|
elif which pacman > /dev/null 2>&1; then LOCK_FILE="/var/lib/pacman/db.lck";\
|
2023-08-16 08:08:08 -07:00
|
|
|
else echo "Packet manager not found"; echo "Internal error"; exit 1; fi;\
|
2024-01-11 00:15:14 +04:00
|
|
|
if command -v fuser > /dev/null 2>&1; then sudo fuser $LOCK_FILE 2>/dev/null; else echo "fuser not installed"; fi
|