Hi Community,

i want to stop HANA DB automatically at reboot or shutdown on SLES12 SP5.

I created a systemd Service for stopping Hana DB but nothing happend.

Systemd Service:
[Unit]
Description=saphana
After=remote-fs.target user.slice sapinit.service multi-user.target
Requires=user.slice

[Service]
KillMode=none
Type=oneshot
ExecStart=/bin/true
ExecStop=/hana/source/scripts/stophanadb
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Script for stophanadb:
#!/bin/bash

su - SIDadm /usr/sap/SID/HDB00/HDB stop


Have anyone the same problem.

Best Regards
Gunnar