#!/bin/sh
echo "Stopping card825 service"
sudo systemctl stop card825.service
echo "Exporting ... XDG_RUNTIME_DIR=/run/user/`id -u`"
export XDG_RUNTIME_DIR=/run/user/`id -u`
export WAYLAND_DISPLAY=/run/user/`id -u`/wayland-0
if [ -f /mnt/nand/bin/setenv.sh ]; then
   . /mnt/nand/bin/setenv.sh
fi
if [ $# -eq 0 ]
  then 
   echo "No IP specified - not mounting NFS"
else
   echo "Mounting nfs $1"
   sudo mount -t nfs $1:/srv/nfs /mnt/nfs -o nolock
   if [ -d /mnt/nfs/arm825/mnt/nand/apps ]; then
      cd /mnt/nfs/arm825/mnt/nand/apps
   else
      cd /mnt/nfs/arm825_nand/apps
   fi
   pwd
fi

