Fix cathook GUI stuff for the logname changes
This commit is contained in:
parent
2c36212e41
commit
9a2890fb2f
12
attach
12
attach
@ -1,15 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
RUNUSER="sudo -u $SUDO_USER"
|
||||
[[ ! -z "$SUDO_USER" ]] && RUNUSER="$SUDO_USER" || RUNUSER="$LOGNAME"
|
||||
RUNCMD="sudo -u $RUNUSER"
|
||||
|
||||
if [ -z "$SUDO_USER" ]; then
|
||||
echo This script may not be run without sudo!
|
||||
exit
|
||||
fi
|
||||
$RUNCMD bash ./scripts/updater --autoupdater
|
||||
|
||||
$RUNUSER bash ./scripts/updater --autoupdater
|
||||
|
||||
line=$(pgrep -u $SUDO_USER hl2_linux)
|
||||
line=$(pgrep -u $RUNUSER hl2_linux)
|
||||
arr=($line)
|
||||
inst=$1
|
||||
if [ $# == 0 ]; then
|
||||
|
12
attach-gdb
12
attach-gdb
@ -1,15 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
RUNUSER="sudo -u $SUDO_USER"
|
||||
[[ ! -z "$SUDO_USER" ]] && RUNUSER="$SUDO_USER" || RUNUSER="$LOGNAME"
|
||||
RUNCMD="sudo -u $RUNUSER"
|
||||
|
||||
if [ -z "$SUDO_USER" ]; then
|
||||
echo This script may not be run without sudo!
|
||||
exit
|
||||
fi
|
||||
$RUNCMD bash ./scripts/updater --autoupdater
|
||||
|
||||
$RUNUSER bash ./scripts/updater --autoupdater
|
||||
|
||||
line=$(pgrep -u $SUDO_USER hl2_linux)
|
||||
line=$(pgrep -u $RUNUSER hl2_linux)
|
||||
arr=($line)
|
||||
inst=$1
|
||||
if [ $# == 0 ]; then
|
||||
|
@ -3,14 +3,10 @@
|
||||
# Thank you LWSS
|
||||
# https://github.com/LWSS/Fuzion/commit/a53b6c634cde0ed47b08dd587ba40a3806adf3fe
|
||||
|
||||
RUNUSER="sudo -u $SUDO_USER"
|
||||
[[ ! -z "$SUDO_USER" ]] && RUNUSER="$SUDO_USER" || RUNUSER="$LOGNAME"
|
||||
RUNCMD="sudo -u $RUNUSER"
|
||||
|
||||
if [ -z "$SUDO_USER" ]; then
|
||||
echo This script may not be run without sudo!
|
||||
exit
|
||||
fi
|
||||
|
||||
$RUNUSER bash ./scripts/updater --autoupdater
|
||||
$RUNCMD bash ./scripts/updater --autoupdater
|
||||
|
||||
line=$(pgrep -u $SUDO_USER hl2_linux)
|
||||
arr=($line)
|
||||
|
5
preload
5
preload
@ -4,7 +4,8 @@ if [ $EUID == 0 ]; then
|
||||
echo "This script must not be run as root"
|
||||
exit
|
||||
fi
|
||||
line=$(pgrep -u $LOGNAME hl2_linux)
|
||||
[[ ! -z "$SUDO_USER" ]] && RUNUSER=$SUDO_USER || RUNUSER=$LOGNAME
|
||||
line=$(pgrep -u $RUNUSER hl2_linux)
|
||||
arr=($line)
|
||||
|
||||
if [ ${#arr[@]} != 0 ]; then
|
||||
@ -12,7 +13,7 @@ if [ ${#arr[@]} != 0 ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
line=$(pgrep -u $LOGNAME steam)
|
||||
line=$(pgrep -u $RUNUSER steam)
|
||||
arr=($line)
|
||||
|
||||
if [ ${#arr[@]} == 0 ]; then
|
||||
|
Reference in New Issue
Block a user