As a relative beginner to both Linux and the Raspberry Pi, I have found myself faced with the (seemingly) daunting challenge of writing my first shell script. In essence, all I would like my script to do is to boot the FileZilla FTP client upon start-up and have it properly shut down when the computer turns off.
Enclosed is the ramshackle script I've hacked together so far to the best of my ability. While I can run the script via the terminal and have it properly open and close the program, I've yet to be able to have my Raspberry Pi open the program automatically on start up. Having looked into this for some considerable time now, I fear that I am presently at my wit's end on the matter, and any help whatsoever on the matter would be greatly appreciated.
My Script (Registered via 'sudo update-rc.d filezilla defaults'):
#! /bin/sh
# /etc/init.d/filezilla
### BEGIN INIT INFO
# Provides: filezilla
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting filezilla"
# run application you want to start
/usr/bin/filezilla
;;
stop)
echo "Stopping filezilla"
# kill application you want to stop
killall filezilla
;;
*)
echo "Usage: /etc/init.d/filezilla {start|stop}"
exit 1
;;
esac
exit 0