Skip to content

Commit

Permalink
translations: wr systemd unit file: set WorkingDir
Browse files Browse the repository at this point in the history
  • Loading branch information
aerickson committed Apr 16, 2024
1 parent 8c5ae7b commit 2a186d4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ done

# from https://docs.taskcluster.net/docs/reference/workers/worker-runner/deployment

TC_USER="ubuntu"
TC_HOME_DIR="/home/${TC_USER}"

# sanity check the task user's homedir exists
ls -la "$TC_HOME_DIR"

# place systemd unit file
cat << EOF > /etc/systemd/system/generic-worker.service
[Unit]
Expand All @@ -22,7 +28,8 @@ ExecStart=/usr/local/bin/start-worker /etc/start-worker.yml
# redirecting to external logging services
StandardOutput=syslog+console
StandardError=syslog+console
User=ubuntu
User=$TC_USER
WorkingDir=$TC_HOME_DIR
[Install]
WantedBy=multi-user.target
Expand Down

0 comments on commit 2a186d4

Please sign in to comment.