Can someone let me know how can I make a systemd service to be stopped first before the unmounting of the file system starts during the shutdown of a host?
Unit File looks like below
[Unit]
Description=FDB Service
After=network-online.target
Wants=network-online.target
[Service]
Environment=FDB_PID_DIR=/var/run/fdb/
Environment=LOCKFILE=/var/run/fdb/fdbmonitor.pid
Type=simple
User=ubuntu
Group=ubuntu
IgnoreSIGPIPE=false
ExecStart=/bin/bash /home/ubuntu/build-target/fdb/fdb-sysd-start.sh
ExecStopPost=-/home/ubuntu/build-target/fdb/fdb-sysd-poststop.sh
RestartSec=2s
Restart=always
[Install]
WantedBy=multi-user.target
- OS -
Ubuntu 16.04.6