FlexHub Forum

Autostart FlexHub on Ubuntu server 14.04 x64

Autostart FlexHub on Ubuntu server 14.04 x64
« on: September 28, 2014, 13:38:58 »
My expеrience....то run FlexHub  on startup ubuntu server x64

methods:
1.run a cron job with the @reboot option - failed
2.add a line in /etc/rc.local - failed
: error while loading shared libraries : lua.so : cannot open shared object file: No such file or directory....
3.made shell script....after long night of fight ;) - successful
Code: [Select]
#!/bin/sh

### BEGIN INIT INFO
# Provides:          samba
# Required-Start:    smbd nmbd
# Required-Stop:     smbd nmbd
# Default-Start:    
# Default-Stop:      
# Short-Description: ensure Samba daemons are started (nmbd and smbd)
### END INIT INFO

#set -e

# start nmbd, smbd and samba-ad-dc unconditionally
# the init scripts themselves check if they are needed or not
case $1 in
start)
cd /usr/share/FlexHub
./lua ./FlexHub.lua --nogui --port=411 &> /dev/null
;;
stop)
killall lua
;;
reload|restart|force-reload)
killall lua
sleep 3
cd /usr/share/FlexHub
./lua ./FlexHub.lua --nogui --port=411 &> /dev/null
#lua /usr/share/FlexHub/FlexHub.lua --nogui --port=411 --logdir=/usr/share/FlexHub/logs --configdir=/usr/share/FlexHub/settings
;;
*)
echo "Usage: /etc/init.d/flexhub {start|stop|reload|restart|force-reload}"
exit 1
;;
esac
now FlexHub starting with Ubuntu server 14.04 x64

#many 10x for help to my brother, en_dator and FlipFlop
« Last Edit: September 28, 2014, 13:48:14 by Scarface »