This information is only valid for CAST Dashboard ≥ 2.x when using a ZIP file deployment (i.e. without Apache Tomcat).
Introduction
Out of the box, the 2.x ZIP files are provided with start-up and shut down scripts that are used to start/stop the web applications manually:
Microsoft Windows <install_folder>\startup.bat *** there is no shutdown.bat for Microsoft Windows - use the CTRL+C escape key to gracefully stop the server if it has been started with the startup.bat file. Linux <install_folder>\startup.sh <install_folder>\shutdown.sh
In addition, for Microsoft Windows deployments, CAST provides scripts to install/uninstall a Microsoft Windows Service. Installation instructions are provided in the relevant dashboard installation guide:
- Standalone Engineering Dashboard deployment using ZIP file
- Standalone Health Dashboard deployment using ZIP file
- Standalone RestAPI deployment using ZIP file
<install_folder>\dashboard-service-install.bat <install_folder>\dashboard_service-uninstall.bat
Auto start via batch script
If you are not using a Microsoft Windows Service (i.e. using the startup script son Linux and Windows) and you need to start the web application when the host server starts, follow the instructions below.
Microsoft Windows
To auto run a batch script when the host server starts can be achieved in many different ways. Two methods that can be used are explained below:
Scheduled task
Create a scheduled task that is set to call the startup.bat file when the host server restarts:
StartUp folder
Create a shortcut to the startup.bat file and then move the shortcut to either of the the StartUp folders (the %PROGRAMDATA% folder is for all users of the machine, so is not user dependent):
- %PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\StartUp
- %APPDATA%\Microsoft\Windows\Start Menu\Programs\StartUp
Linux
There are various methods of automatically running a .sh script on host server startup:
- Use crontab with an @reboot entry, for example
@reboot /path/to/startup.sh
- Place the startup.sh script in the /etc/init.d/ folder