Command-line utility: avoid double free()s when modifying config option
[browser-switch] / xsession-post.sh
1 #!/bin/sh
2
3 # start Browser Switchboard, then start MicroB if appropriate
4 /usr/bin/browser-switchboard > /dev/null 2>&1 &
5
6 if ! /bin/pidof browser > /dev/null 2>&1; then
7         DEFAULT_BROWSER=`/usr/bin/browser-switchboard-config -b`
8         AUTOSTART_MICROB=`/usr/bin/browser-switchboard-config -o autostart_microb`
9         if [ "$AUTOSTART_MICROB" -eq 1 ] || [ "$DEFAULT_BROWSER" = "microb" -a "$AUTOSTART_MICROB" -ne 0 ]; then
10                 /usr/bin/maemo-invoker /usr/bin/browser.launch > /dev/null 2>&1 &
11         fi
12 fi