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

sitnol.sh


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".
*** sitnol.sh 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. [code] #!/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 [/code] If it does work change the cut parameter "-f 1" to "-f 2".
total: 221.54ms (include: 2.53, request: 0.77, trace: 0.42, init: 3.37, load: 214.39, parse: 0.98, menu: 2.4, template: 0.06, minify: )