From dd2356cf0432b32487aaf0262aa33d20acd5dd34 Mon Sep 17 00:00:00 2001 From: PTah Date: Mon, 13 Jul 2026 17:23:58 +1000 Subject: [PATCH] fix: LF line endings in deploy shell scripts (systemd 203/EXEC) CRLF in sac-api-start.sh shebang broke sac-api with status=203/EXEC on Linux. Add .gitattributes for *.sh and strip CR in sac-deploy before chmod. --- .gitattributes | 2 ++ deploy/sac-deploy.sh | 1 + 2 files changed, 3 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..cba3316 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Shell scripts must use LF — CRLF in shebang breaks systemd (status=203/EXEC). +*.sh text eol=lf diff --git a/deploy/sac-deploy.sh b/deploy/sac-deploy.sh index 56db75c..e54f2ee 100644 --- a/deploy/sac-deploy.sh +++ b/deploy/sac-deploy.sh @@ -95,6 +95,7 @@ if [ -f "${APP_ROOT}/deploy/systemd/${SERVICE_NAME}.service" ]; then fi START_SH="${APP_ROOT}/deploy/systemd/sac-api-start.sh" if [ -f "${START_SH}" ]; then + sed -i 's/\r$//' "${START_SH}" chmod 755 "${START_SH}" fi