ken_nogi/NodeJS/postfixConsole_org/scripts/almalinux/start_service.sh
Kenichiro NOGI 88a402ce0f up
2026-07-10 18:13:30 +09:00

13 lines
317 B
Bash

#!/usr/bin/env bash
set -euo pipefail
SERVICE_NAME="postfixconsole"
if [[ "${EUID}" -eq 0 ]]; then
systemctl start "${SERVICE_NAME}"
systemctl --no-pager --full status "${SERVICE_NAME}" || true
else
sudo systemctl start "${SERVICE_NAME}"
sudo systemctl --no-pager --full status "${SERVICE_NAME}" || true
fi