Skip to content
Permalink
Browse files

Fix cathook GUI stuff for the logname changes

  • Loading branch information
BenCat07 committed Sep 11, 2019
1 parent 2c36212 commit 9a2890fb2fd1fba2051e37c9c75f57f077a30a39
Showing with 14 additions and 25 deletions.
  1. +4 −8 attach
  2. +4 −8 attach-gdb
  3. +3 −7 attach-libnamed.sh
  4. +3 −2 preload
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

$RUNUSER bash ./scripts/updater --autoupdater
$RUNCMD bash ./scripts/updater --autoupdater

line=$(pgrep -u $SUDO_USER hl2_linux)
line=$(pgrep -u $RUNUSER hl2_linux)
arr=($line)
inst=$1
if [ $# == 0 ]; then
@@ -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

$RUNUSER bash ./scripts/updater --autoupdater
$RUNCMD 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)
@@ -4,15 +4,16 @@ 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
echo TF2 Already Running!
exit
fi

line=$(pgrep -u $LOGNAME steam)
line=$(pgrep -u $RUNUSER steam)
arr=($line)

if [ ${#arr[@]} == 0 ]; then

0 comments on commit 9a2890f

Please sign in to comment.
You can’t perform that action at this time.