Skip to content

Commit ae7fbbc

Browse files
committed
fix: update log file ownership and permissions in deployment script
1 parent 9b7e242 commit ae7fbbc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ops/zero-downtime-deployment-script.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
NMRKIT_IMAGE="nfdi4chem/nmrkit:dev-latest"
77
NMR_CLI_IMAGE="nfdi4chem/nmr-cli:dev-latest"
88
LOG_FILE="/var/log/nmrkit-deploy.log"
9+
LOG_OWNER="${SUDO_USER:-$(whoami)}"
910

1011
# Create log file if it doesn't exist
1112
if [ ! -f "$LOG_FILE" ]; then
1213
sudo touch "$LOG_FILE"
1314
sudo chmod 644 "$LOG_FILE"
15+
sudo chown "$LOG_OWNER":"$LOG_OWNER" "$LOG_FILE"
1416
fi
1517

1618
# Unified logging function

0 commit comments

Comments
 (0)