From ec2ff4b798294fc1e2e2fec6c41d3399d9be3d22 Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 8 Apr 2014 18:18:45 +0200 Subject: Added better per environment starting of programs. --- bin/autostart | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/autostart b/bin/autostart index f1f4f6e..8a9db47 100755 --- a/bin/autostart +++ b/bin/autostart @@ -6,11 +6,19 @@ export XAUTHORITY=/home/dave/.Xauthority KERNEL_NAME=$(uname -r) if [[ "$KERNEL_NAME" != *rt* ]]; then - dropbox start & - owncloud & + pid=$(pidof dropbox) + re='^[0-9]+$' + if [[ $pid =~ $re ]];then + echo "Dropbox alread running. Restarting..." + dropbox stop && dropbox start & + else + dropbox start & + fi + pulseaudio --start & nm-applet & firewall-applet & urxvt & + owncloud & else pulseaudio --kill & qjackctl & -- cgit v1.2.3-70-g09d2