Commit ee85604 1 parent 747f128 commit ee85604 Copy full SHA for ee85604
File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
3
+
4
+ # This is a dirty hack to keep the media user logged in.
5
+ # For some reason it keeps getting kicked out to the login
6
+ # prompt, which means EyeTV is not able to record shows.
7
+
8
+ # We check to see if the Dock app is running
9
+ # If not, wait 30 seconds and check again
10
+ # If it's still not running, we reboot the mac and let the
11
+ # account auto login as it normally should
12
+
13
+ LOG=" $HOME /reboot.log"
14
+
15
+ check () {
16
+ TEST=$( pgrep -U $( whoami) Dock)
17
+ RESULT=" $? "
18
+ }
19
+
20
+ check
21
+ if [ " $RESULT " = 0 ]
22
+ then
23
+ echo " $( date) Dock found" >> $LOG
24
+ exit
25
+ else
26
+ echo " $( date) Dock not found, wating 30 seconds" >> $LOG
27
+ sleep 30
28
+ check
29
+ if [ " $RESULT " = 0 ]
30
+ then
31
+ exit
32
+ else
33
+ echo " $( date) Dock still not found, rebooting NOW" >> $LOG
34
+ sudo reboot
35
+ fi
36
+ fi
You can’t perform that action at this time.
0 commit comments