#!/bin/sh

# opencocon menu lancher
# running on lxterminal (New mode) or .profile (Classic mode)

PWROFF="/tmp/.cocon.poweroff"

if [ -e $PWROFF ];
then
  rm $PWROFF
fi


# Menu Loop
while :
do
  if [ -e $PWROFF ];
  then
    # do poweroff
    su -c "poweroff" root
    break
  fi
  /usr/bin/cocon-menu
done

# Power off runs on .profile!
