https://github.com/dave-carter-uk/apps-stop-start-control
Framework to start/stop and check applications running on a host
https://github.com/dave-carter-uk/apps-stop-start-control
automation bash-script powershell sap start stop
Last synced: 7 months ago
JSON representation
Framework to start/stop and check applications running on a host
- Host: GitHub
- URL: https://github.com/dave-carter-uk/apps-stop-start-control
- Owner: dave-carter-uk
- Created: 2025-02-14T17:13:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-17T15:19:30.000Z (about 1 year ago)
- Last Synced: 2025-06-17T10:47:41.631Z (8 months ago)
- Topics: automation, bash-script, powershell, sap, start, stop
- Language: PowerShell
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Apps-Stop-Start-Control
Framework to start/stop and check applications running on a host
Main scripts are appcontrol.ps1 and appcontrol.sh
Wrapper scripts are provided as azcontrol.ps1 or something like that which basically just call the main scripts with some sort of logging, but basically same.
These scripts provide start/stop or check for the following services:
- SAPInstance (Windows & Linux) SAP system instance
- WINService (Windows) Windows service
- WINCluster (Windows) local cluster
- HANACluster (Linux) HANA Cluster
But following the framework within the scripts additional services can be added
## Configuration file
The script reads a configuration file stored in the same directory as the script and called *hostname*.conf. This configuration file describes the applications and services running on this host.
For example:
```
# File $hostname.conf
WINService -Name "SQL Server (MSSQLSERVER)"
WINService -Name "SQL Server Agent (MSSQLSERVER)"
WINService -Name "Server Intelligence Agent (N24QASDZQA01)"
WINCluster -Roles "SAPSIDROLE", "ANOTHERROLE"
SAPInstance -Dir F:\usr\sap\XYZ\ASCS01 -User xydadm -Pass "blahblah"
SAPInstance -Dir F:\usr\sap\XYZ\DVEBMGS00 -User xydadm -Pass "blahblah" -Grace 60
```
Services are processed from top to bottom (ascending) on Start and bottom to top (descending) on Stop
Calling ```azcontrol.ps1 Start``` will Start the 3 Windows Services first, then the Local Cluster and then SAP ASCS instance and then app instance
Calling ```azcontrol.ps1 Stop``` will stop SAP app instance, then ASCS, then local Cluster and then each Windows Service in turn
Example 2
```
# File $hostname.conf
HANACluster /usr/sap/DEV/HDB00
SAPInstance /usr/sap/XYZ/DVEBMGS69
```
Services are process from top to bottom (ascending) on Start and bottom to top (descending) on Stop
Calling ```azcontrol.sh stop``` will stop SAP Instance and then shutdown the HANA cluster
Calling ```azcontrol.sh start``` will start HANA cluster and then start SAP Instance
## Implementation
Best thing to do is to have a fiddle around with the scripts and see if they are suitable or do what you require. Hopefully the code is pretty easy and self explanatory and you can use or adapt them for you requirements.
The framework basically boils down to:
The main control section calling functions:
start--whatever
stop--whaterver
check--whatever
additional functions can be added if required.