I finally got my hands on a DroboFS and I cannot believe they didn’t make the app support backward compatible as it seems the binaries will for the Droboshare will run on the DroboFS. There should be a list of system changes between the two, but I guess for now we will have to use the force.
Anyway, I’ve found that it is fairly simple to create a service.sh that you can drop into your old droboshare apps and have them run both the droboshare and the drobofs.
Here is an example:
#!/bin/sh
Service.sh for the DroboFS
This service.sh should allow droboapps from the Droboshare to operate on the DroboFS.
It is an attempt to remidy the lack of a compatibilty mode or migration path for Droboshare apps.
Most Droboshare Apps will run on the DroboFS without modification if they can be started and
shutdown properly.
Just read the comments and edit what they tell you to edit (search for ‘change’), add to your
Droboshare app and then it should work on both the Droboshare and the DroboFS.
Other Notes:
Since the service.sh is very poorly documented here are some things that will help.
Service.sh will be called with with either a start, stop, restart or status.
When called there are several enviorment variables that are very helpful for you to use in
starting up your App.
DROBOAPPS_DIR=’/mnt/DroboFS/Shares/DroboApps’ or the drobo apps directory on your machine.
yoics_enable=‘YES’ There will be a listing of all apps on the box, not just yours.
service_conf=’/mnt/DroboFS/Shares/DroboApps/.servicerc’
I wish it had a “directory of droboshare mount” like in previous releases but we can infer that
from the DROBOAPPS_DIR like so $DROBOAPPS_DIR/…/
Old method of calling ([service_name]-start.sh)
$1 is name of droboshare
$2 is directory of droboshare mount
$3 is path to instalation directory
mike-at-yoics-dot-com
read this file first if you want to modify anything
. /etc/service.subr
Required DroboApps variables (do not change)
prog_dir=dirname \
realpath $0``
Put your service name here (change). Must be the same as your start and stop files
ie. [service]-start.sh and [service]-stop.sh
name=“yoics”
Put your version number here (change)
version=“0.7”
Other variables
pidfile=${prog_dir}/log/${name}.pid # location of pid file (change to real one) so status will work
logfile=${prog_dir}/startup.log # location of log file
libdir=${prog_dir}/lib
lastlog=${prog_dir}/startup.log1
Your Custom Variables (change if needed)
In my case I need a different default configuation file for the drobo-fs than the droboshare
$YOICS_CFG_FILE="${prog_dir}/bin/yoics.txt"
$YOICS_DEFAULT_DROBOFS_CFG_FILE="${prog_dir}/bin/yoics-fs.default"
Set Paths
SERVICE_ROOT=$prog_dir
STARTLOG=$logfile
#log startup
echo “service $0 called with command $1” >> $STARTLOG
set files (change if you need any special processing for every call)
#special check for Yoics, this needs to be done before Droboshare start because
#we need a different config file as the Droboshare and DroboFS have different
#networking adapter names.
First check for yoics.txt
if [ ! -e $YOICS_BIN$YOICS_CFG_FILE ]
then
echo “No $YOICS_CFG_FILE exists, copy over $YOICS_DEFAULT_DROBOFS_CFG_FILE” >> $STARTLOG
cp $YOICS_DEFAULT_DROBOFS_CFG_FILE $YOICS_CFG_FILE >> $STARTLOG
fi
start()
{
$SERVICE_ROOT/${name}-start.sh drobo $DROBOAPPS_DIR/… $SERVICE_ROOT
}
case “$1” in
start)
echo "start call" >> $STARTLOG
start_service
;;
stop)
echo “stop call” >> $STARTLOG
$SERVICE_ROOT/${name}-stop.sh
;;
restart)
echo "restart call" >> $STARTLOG
stop_service
sleep 3
start_service
;;
status)
echo “status call” >> $STARTLOG
status
;;
*)
echo “Usage: $0 [start|stop|restart|status]”
exit 1
;;
esac