Also turn gsm power on/off
[gregoa/zavai.git] / hooks / gsm
1 #!/bin/sh
2
3 case "$1" in
4         # At the start of zavai
5         status)
6         ;;
7         # Run, blocking until the process ends
8         run)
9                 if [ -x /usr/bin/frameworkd ]
10                 then
11                         # Start frameworkd for GSM services only
12                         om gsm power 1
13                         /usr/bin/frameworkd -s ogsmd > /tmp/zavai-frameworkd.log 2>&1
14                         om gsm power 0
15                 else
16                         # For testing
17                         exec sleep 10
18                 fi
19         ;;
20         *)
21                 echo "Usage: $0 {run|status}." >&2
22                 exit 1
23         ;;
24 esac
25
26 exit 0