Skip to content

Commit b3bb30d

Browse files
authored
Run script in a login shell (#577)
1 parent 58ee491 commit b3bb30d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

task/common/machine/script.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ sudo tee /etc/systemd/system/tpi-task.service > /dev/null <<END
6060
After=default.target
6161
[Service]
6262
Type=simple
63-
ExecStart=-/usr/bin/tpi-task
63+
ExecStart=-/bin/bash -lc 'exec /usr/bin/tpi-task'
6464
ExecStop=/bin/bash -c 'systemctl is-system-running | grep stopping || echo "{\\\\"result\\\\": \\\\"\$SERVICE_RESULT\\\\", \\\\"code\\\\": \\\\"\$EXIT_STATUS\\\\", \\\\"status\\\\": \\\\"\$EXIT_CODE\\\\"}" > "$TPI_LOG_DIRECTORY/status-$TPI_MACHINE_IDENTITY" && RCLONE_CONFIG= rclone copy "$TPI_LOG_DIRECTORY" "\$RCLONE_REMOTE/reports"'
6565
ExecStopPost=/usr/bin/tpi-task-shutdown
6666
Environment=HOME=/root

0 commit comments

Comments
 (0)