#!/bin/bash

echo -n "NOTIFY OREMOTE LOGIN" >/dev/udp/localhost/7624

#exemple nas mount
/bin/mount -o nolock,proto=udp 192.168.1.6:/Volumes/3 mnt/sda1/Movies3
/bin/mount -o nolock,proto=udp 192.168.1.6:/Volumes/5 mnt/sda1/Movies5
/bin/mount -o nolock,proto=udp 192.168.1.6:/Volumes/4 mnt/sda1/Movies4
/bin/mount -o nolock,proto=udp 192.168.1.6:/Volumes/7 mnt/sda1/Movies7
/bin/mount -o nolock,proto=udp 192.168.1.6:/Volumes/8 mnt/sda1/Movies8
sync
sync

echo "all shares mounted" >> /tmp/jb_init.log
echo -e "drv.ir.rx.sq 0x10000\nquit" | cliprog    #Invalid command, the screen returns to normal
echo -e "drv.ir.rx.sq 0x3f000\nquit" | cliprog    #Left
echo -e "drv.ir.rx.sq 0x3f000\nquit" | cliprog    #Left
echo -e "drv.ir.rx.sq 0x3f000\nquit" | cliprog    #Left
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter
sleep 10s
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Volumes3
sleep 5s
echo -e "drv.ir.rx.sq 0x9f003\nquit" | cliprog    #Return
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Volumes4
sleep 5s
echo -e "drv.ir.rx.sq 0x9f003\nquit" | cliprog    #Return
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Volumes5
sleep 5s
echo -e "drv.ir.rx.sq 0x9f003\nquit" | cliprog    #Return
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Volumes7
sleep 5s
echo -e "drv.ir.rx.sq 0x9f003\nquit" | cliprog    #Return
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Volumes8
sleep 5s
echo -e "drv.ir.rx.sq 0x8f002\nquit" | cliprog    #Home
echo -e "drv.ir.rx.sq 0x3f000\nquit" | cliprog    #Left
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Movies
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Oppo Flash Drive
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Movies3
sleep 2s
echo -e "drv.ir.rx.sq 0x9f003\nquit" | cliprog    #Return
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Movies4
sleep 2s
echo -e "drv.ir.rx.sq 0x9f003\nquit" | cliprog    #Return
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Movies5
sleep 2s
echo -e "drv.ir.rx.sq 0x9f003\nquit" | cliprog    #Return
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Movies7
sleep 2s
echo -e "drv.ir.rx.sq 0x9f003\nquit" | cliprog    #Return
echo -e "drv.ir.rx.sq 0x3f003\nquit" | cliprog    #Down
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Movies8
sleep 2s
echo -e "drv.ir.rx.sq 0x8f002\nquit" | cliprog    #Home
echo -e "drv.ir.rx.sq 0x3f001\nquit" | cliprog    #Right
echo -e "drv.ir.rx.sq 0x3f001\nquit" | cliprog    #Right
echo -e "drv.ir.rx.sq 0x3f001\nquit" | cliprog    #Right
echo -e "drv.ir.rx.sq 0x4f000\nquit" | cliprog    #Enter Favorites
