From 4041549aafb64057629e8f13d1876c44ae5fe9c8 Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 28 Nov 2014 14:40:09 +0100 Subject: adjust_dpms: Merging script based programs into the same Array as the others. Adding -x to pidof check. --- bin/adjust_dpms | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'bin') diff --git a/bin/adjust_dpms b/bin/adjust_dpms index 0391dba..c8e8a0f 100755 --- a/bin/adjust_dpms +++ b/bin/adjust_dpms @@ -18,10 +18,10 @@ else exit 1 fi -# loop all pre-compiled programs and check for running instances +# loop all programs and check for running instances for i in "${programs[@]}" do - pid=$(pidof $i) + pid=$(pidof -x $i) re='^[0-9]+$' if [[ $pid =~ $re ]]; then echo "$i running ($pid)" @@ -29,17 +29,6 @@ do fi done -# loop all python2 run programs and check for running instances -for i in "${python2[@]}" -do - pid=$(pidof python2 $i) - re='^[0-9]+$' - if [[ $pid =~ $re ]]; then - echo "$i running ($pid)" - blankoff=1 - fi -done - # if valuable programs are running, don't use screen blanking if [ $blankoff -gt 0 ]; then echo "Some program requires screensaver to be off." -- cgit v1.2.3-70-g09d2 From 79ebdca9afa76692dbb44a54aff5374d54d35db1 Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 28 Nov 2014 14:41:52 +0100 Subject: checkip: Adding two more possible versions for checking global IP behind NAT. Version using dig now default. --- bin/checkip | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/checkip b/bin/checkip index f7f2f4c..0e9d345 100755 --- a/bin/checkip +++ b/bin/checkip @@ -1,3 +1,4 @@ #!/bin/bash -ip=`curl -s http://checkip.dyndns.org | sed 's/[a-zA-Z/<> :]//g'` -echo "$ip" +#echo "$(curl -s http://checkip.dyndns.org | sed 's/[a-zA-Z/<> :]//g') +#wget -qO- http://ipecho.net/plain ; echo +dig +short myip.opendns.com @resolver1.opendns.com -- cgit v1.2.3-70-g09d2 From fc583e38f8b3cf52b0452cc121bfe91ef4c154b3 Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 28 Nov 2014 14:44:42 +0100 Subject: start_jack: Removing unneeded comments, adding TODO for external config file. --- bin/start_jack | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/start_jack b/bin/start_jack index 735d5fa..0c99aab 100755 --- a/bin/start_jack +++ b/bin/start_jack @@ -1,5 +1,5 @@ #!/bin/sh - +# Script to start JACK as a user with several settings setup export DISPLAY=:0.0 #jackd -P70 -p16 -t2000 -dalsa -dhw:0,0 -p128 -n3 -r44100 -s > .log/jackd.log 2>&1 & @@ -23,6 +23,7 @@ case "$HOSTNAME" in ;; "dvzrv") DEVICE="/dev/fw1" + # TODO: Add settings from separate config file if [[ -e $DEVICE && -r $DEVICE && -w $DEVICE ]]; then echo "Setting up "$DEVICE" with JACK." jack_control start @@ -31,9 +32,7 @@ case "$HOSTNAME" in jack_control ds firewire jack_control dps device $DEVICE jack_control dps rate 48000 - #jack_control dps rate 44100 jack_control dps nperiods 2 - #jack_control dps period 64 jack_control dps period 256 sleep 3 a2jmidid -e & -- cgit v1.2.3-70-g09d2