Add error message to injector if no pid
This commit is contained in:
parent
7e46e74b9e
commit
160aba82c1
|
@ -3,6 +3,11 @@
|
||||||
pid=$(pidof "hl_linux")
|
pid=$(pidof "hl_linux")
|
||||||
libpath=$(realpath "libhlcheat.so")
|
libpath=$(realpath "libhlcheat.so")
|
||||||
|
|
||||||
|
if [ "$pid" == "" ]; then
|
||||||
|
echo "inject.sh: process not running."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Used to echo the command. For debugging.
|
# Used to echo the command. For debugging.
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
|
@ -21,7 +26,7 @@ if [ "$1" == "unload" ]; then
|
||||||
-ex "detach" \
|
-ex "detach" \
|
||||||
-ex "quit"
|
-ex "quit"
|
||||||
|
|
||||||
exit 0;
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q "$libpath" "/proc/$pid/maps"; then
|
if grep -q "$libpath" "/proc/$pid/maps"; then
|
||||||
|
|
Loading…
Reference in New Issue