#!/bin/bash # To be run by user mkt to stop the systemd-managed EspoCRM pod and # containers. Does NOT disable the services: autostart stays in place. # Environment variables POD_NAME='espocrm_pod' DB_CTR='mariadb_ctr' WEB_CTR='espocrm_ctr' DAEMON_CTR='espocrm_daemon_ctr' # Stop in reverse dependency order: daemon -> web -> db -> pod systemctl --user stop "container-${DAEMON_CTR}.service" echo "Stopped container-${DAEMON_CTR}.service (rc=$?)" systemctl --user stop "container-${WEB_CTR}.service" echo "Stopped container-${WEB_CTR}.service (rc=$?)" systemctl --user stop "container-${DB_CTR}.service" echo "Stopped container-${DB_CTR}.service (rc=$?)" systemctl --user stop "pod-${POD_NAME}.service" echo "Stopped pod-${POD_NAME}.service (rc=$?)" echo "" echo "EspoCRM stopped (autostart still enabled)." echo "Start again: systemctl --user start pod-${POD_NAME}.service container-${DB_CTR}.service container-${WEB_CTR}.service container-${DAEMON_CTR}.service"