8 (Undefined offset: 8) in /home/mark/public_html/code/lazydoc.php:184
software/things/index
.2sitnol.sh,2


Send SIGHALT or SIGCONT to all user-processes, except SSH and everything that runs on a TTY. Good to run on LID events, stops f***ing flash shit from producing entropy.
#!/bin/sh


uids="$(cat /etc/passwd | egrep ":x:0-9{4,}" | cut -d ":" -f 3 | tr "\n" " ")"
#pids="$(ps U "${uids:0:-1}" -o pid | tr "\n" " ")"
pids="$(ps U "${uids:0:-1}" | egrep -v "(ssh)|(PID TTY)" | cut -d " " -f 1 | tr "\n" " ")"


if "$1" == "close" ; then
for p in a $pids; do
if [ "$p" =~ ^[0-9+$ ]]; then
logger "Stopping $p"
kill -STOP $p
fi
done
else
for p in a $pids; do
if [ "$p" =~ ^[0-9+$ ]]; then
logger "Starting $p"
kill -CONT $p
fi
done
fi


If it does work change the cut parameter "-f 1" to "-f 2".
.2sitnol.sh,2 Send SIGHALT or SIGCONT to all user-processes, except SSH and everything that runs on a TTY. Good to run on LID events, stops f***ing flash shit from producing entropy. #!/bin/sh uids="$(cat /etc/passwd | egrep ":x:[0-9]{4,}" | cut -d ":" -f 3 | tr "\n" " ")" #pids="$(ps U "${uids:0:-1}" -o pid | tr "\n" " ")" pids="$(ps U "${uids:0:-1}" | egrep -v "(ssh)|(PID TTY)" | cut -d " " -f 1 | tr "\n" " ")" if [ "$1" == "close" ]; then for p in a $pids; do if [[ "$p" =~ ^[0-9]+$ ]]; then logger "Stopping $p" kill -STOP $p fi done else for p in a $pids; do if [[ "$p" =~ ^[0-9]+$ ]]; then logger "Starting $p" kill -CONT $p fi done fi If it does work change the cut parameter "-f 1" to "-f 2".
total: 280.61ms (include: 2.17, request: 0.74, trace: 0.34, init: 3.15, load: 275.67, parse: 0.45, menu: 1.2, template: 0.03, minify: )