#!/bin/bash
### BEGIN BOOT SCRIPT INFO
#Long-Name: DtCyber
#Short-Name: dtcyber
### END BOOT SCRIPT INFO
### BEGIN BOOT SCRIPT INSTALLATION DEFAULTS
#Launch-Mode: gui-and-terminal
### END BOOT SCRIPT INSTALLATION DEFAULTS
#
#This boot script is for DtCyber configurations without a node.js wrapper
#script. If there is an images/ directory present, this script will cd to it
#before launching DtCyber. If there is a scriptlet called DTCYBER_PRE_START
#present, it will be run before DtCyber is started.

if [ -e ./images ]
then
	if ! cd "$PWD/images"
	then
		echo "cannot cd to image subdirectory" >&2
		exit 1
	fi
fi

if [ -f ./DTCYBER_PRE_START ]
then
	. ./DTCYBER_PRE_START
fi

exec dtcyber
