aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/backup-profiles8
-rwxr-xr-xbin/check-rt11
-rwxr-xr-xbin/check-vanilla11
-rwxr-xr-xbin/start_jack36
-rwxr-xr-xbin/stop_jack7
-rwxr-xr-xbin/tmux-mem-cpu-loadbin0 -> 30782 bytes
6 files changed, 65 insertions, 8 deletions
diff --git a/bin/backup-profiles b/bin/backup-profiles
index fd7eb3b..9e5c9a1 100755
--- a/bin/backup-profiles
+++ b/bin/backup-profiles
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Backup profiles of firefox and thunderbird to local Dropbox (or other location) while encrypting them using gpg
+# Backup profiles of firefox and thunderbird to local ownCloud (or other location) while encrypting them using gpg
#
firefoxPID=`ps -C firefox -o pid=`
@@ -23,7 +23,7 @@ then
tar cfPzh $firefoxTMP -C $firefoxIF $profileName
echo "Encrypting profile."
gpg -e -r 'David Runge <david.runge@frqrec.com>' $firefoxTMP
- echo "Moving backup to Dropbox."
+ echo "Moving backup to ownCloud."
mv -f $firefoxTMP$gpgEND $OF
echo "Cleaning up."
rm $firefoxTMP
@@ -36,7 +36,7 @@ else
tar cfPzh $firefoxTMP -C $firefoxIF $profileName$backupEND
echo "Encrypting profile."
gpg -e -r 'David Runge <david.runge@frqrec.com>' $firefoxTMP
- echo "Moving backup to Dropbox."
+ echo "Moving backup to ownCloud."
mv -f $firefoxTMP$gpgEND $OF
echo "Cleaning up."
rm $firefoxTMP
@@ -53,7 +53,7 @@ then
tar cfPz $thunderbirdTMP -C $thunderbirdIF $profileName
echo "Encrypting profile."
gpg -e -r 'David Runge <david.runge@frqrec.com>' $thunderbirdTMP
- echo "Moving backup to Dropbox."
+ echo "Moving backup to ownCloud."
mv -f $thunderbirdTMP$gpgEND $OF
echo "Cleaning up."
rm $thunderbirdTMP
diff --git a/bin/check-rt b/bin/check-rt
new file mode 100755
index 0000000..5dc04cd
--- /dev/null
+++ b/bin/check-rt
@@ -0,0 +1,11 @@
+#!/bin/env bash
+#Check if the kernel name has -rt in it (we're running Realtime Kernel)
+
+if [[ $(uname -r) == *-rt* ]];then
+ echo "Success: Running $(uname -r)."
+ exit 0
+else
+ echo "Failure: Running $(uname -r)."
+ exit 1
+fi
+
diff --git a/bin/check-vanilla b/bin/check-vanilla
new file mode 100755
index 0000000..6b4bdd4
--- /dev/null
+++ b/bin/check-vanilla
@@ -0,0 +1,11 @@
+#!/bin/env bash
+#Check if the kernel name has -rt in it (we're running Realtime Kernel)
+
+if [[ $(uname -r) == *-rt* ]];then
+ echo "Failure: Running $(uname -r)."
+ exit 1
+else
+ echo "Success: Running $(uname -r)."
+ exit 0
+fi
+
diff --git a/bin/start_jack b/bin/start_jack
index 48e97ed..735d5fa 100755
--- a/bin/start_jack
+++ b/bin/start_jack
@@ -1,7 +1,9 @@
#!/bin/sh
+export DISPLAY=:0.0
#jackd -P70 -p16 -t2000 -dalsa -dhw:0,0 -p128 -n3 -r44100 -s > .log/jackd.log 2>&1 &
+echo $HOSTNAME
case "$HOSTNAME" in
"pitheunlord")
jackd -P95 -p32 -ddummy -C1 &> .log/jackd.log &
@@ -22,11 +24,39 @@ case "$HOSTNAME" in
"dvzrv")
DEVICE="/dev/fw1"
if [[ -e $DEVICE && -r $DEVICE && -w $DEVICE ]]; then
- echo "Setting up Motu Traveler with JACK"
+ echo "Setting up "$DEVICE" with JACK."
+ jack_control start
+ sudo schedtool -R -p 20 `pidof jackdbus`
+ jack_control eps realtime true
+ 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 &
+ sudo schedtool -R -p 20 `pidof a2jmidid`
+ rm ~/.config/SuperCollider/startup.scd
+ ln -s ~/.config/SuperCollider/startupfiles/electronicStudio.scd ~/.config/SuperCollider/startup.scd -v
else
- echo "Setting up internal JACK server"
+ echo "Setting up ALSA with JACK."
+ jack_control start
+ sudo schedtool -R -p 20 `pidof jackdbus`
+ jack_control eps realtime true
+ jack_control ds alsa
+ jack_control dps device hw:PCH
+ jack_control dps rate 48000
+ jack_control dps nperiods 2
+ jack_control dps period 256
+ sleep 4
+ a2jmidid -e &
+ sudo schedtool -R -p 20 `pidof a2jmidid`
+ rm ~/.config/SuperCollider/startup.scd
+ ln -s ~/.config/SuperCollider/startupfiles/startupSystem.scd ~/.config/SuperCollider/startup.scd -v
+
fi
-# jack_control start
;;
esac
diff --git a/bin/stop_jack b/bin/stop_jack
index ab49fa9..9c47548 100755
--- a/bin/stop_jack
+++ b/bin/stop_jack
@@ -1,6 +1,11 @@
#!/bin/sh
-kill $(pidof jackd)
+jack_control stop
+sleep 3
+jack_control exit
+exit 0
+
+#kill $(pidof jackd)
#case "$HOSTNAME" in
# "beagleclone")
# kill $(pidof jackd)
diff --git a/bin/tmux-mem-cpu-load b/bin/tmux-mem-cpu-load
new file mode 100755
index 0000000..aeb7c7c
--- /dev/null
+++ b/bin/tmux-mem-cpu-load
Binary files differ