Answer the question
In order to leave comments, you need to log in
Is it possible to prevent software from running on centos?
Is it possible to implement a script on bash that would not allow the launch of a second copy of the Client part on a PC with centos 6.4
the label itself has the content
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[ru_RU]=xfce4_xicon1
Exec=/mnt/po/client.sh
Icon=xfce4_xicon1
Answer the question
In order to leave comments, you need to log in
Add the creation of a pid file and checking for its existence in client.sh.
Something like this:
linuxhub.ru/viewtopic.php?t=1626
You can modify client.sh in such a way that it searches for a running copy and, if found, quietly glues bots with diagnostics that the slippers are already taken :) Since it is apparently graphical, you can even issue diagnostics through some window :)
UPD: The easiest way:
var1=`ps -ax | grep client-process-name | grep -v grep`
if [ $#var1 -ne 0 ]; then
echo 'Тапки заняты!'
exit 100
fi
Use the fasterxml.jackson library, it parses any jackson well)
https://www.mkyong.com/java/how-to-convert-java-ob...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question