I would like to create an entirely automated box (based on something like a Raspberry-Pi or OLinuXino card).
My box would run a Debian based system with a read-only filesystem and a ramdisk (to avoid SD card corruptions).
I would like to create a script that automatically connects to a remote server (via ssh) each time the box is switched on or plugged to a network.
To do so, I think my simplest solution is to create a shell script running as a daemon. This daemon will have to stay alive until the box is shut down or disconnected from network. The script should be able to reconnect when network is up or box restarts.
The question: do you think a shell script is safe enough to perform this ? Or should I better use another (and safer) programming language (PERL, C, ...) ?