From 92d54e1ab0cda26a0c2f5e6379cd60092256eab2 Mon Sep 17 00:00:00 2001 From: Matt Matt <52276910+MattpMatt@users.noreply.github.com> Date: Tue, 26 Sep 2023 11:49:43 +1300 Subject: [PATCH 1/3] Update job-start.em Initialize groups so permissions carry over --- templates/job-start.em | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/job-start.em b/templates/job-start.em index bfaeb60..d0ca6cf 100644 --- a/templates/job-start.em +++ b/templates/job-start.em @@ -127,7 +127,7 @@ if [ "$?" != "0" ]; then fi # Punch it. -setpriv --reuid @(user) ros2 launch $LAUNCH_FILENAME @(roslaunch_wait?'--wait ')& +setpriv --reuid @(user) --regid @(user) --init-groups ros2 launch $LAUNCH_FILENAME @(roslaunch_wait?'--wait ')& PID=$! log info "@(name): Started ros2 launch as background process, PID $PID, ROS_LOG_DIR=$ROS_LOG_DIR" From 010aa744971dbf1cb81c449642eae78729d2aec4 Mon Sep 17 00:00:00 2001 From: Matt Matt <52276910+MattpMatt@users.noreply.github.com> Date: Tue, 26 Sep 2023 16:04:50 +1300 Subject: [PATCH 2/3] Update systemd_job.conf.em --- templates/systemd_job.conf.em | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/systemd_job.conf.em b/templates/systemd_job.conf.em index c2d34af..0b44f63 100644 --- a/templates/systemd_job.conf.em +++ b/templates/systemd_job.conf.em @@ -34,6 +34,7 @@ After=@(systemd_after) [Service] Type=simple ExecStart=/usr/sbin/@(name)-start +TimeoutStopSec=10 [Install] WantedBy=multi-user.target From c3008254a9a8165de0c910fbb68e5b82a140272a Mon Sep 17 00:00:00 2001 From: Matt Matt <52276910+MattpMatt@users.noreply.github.com> Date: Tue, 26 Sep 2023 16:06:25 +1300 Subject: [PATCH 3/3] Update systemd_job.conf.em --- templates/systemd_job.conf.em | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/systemd_job.conf.em b/templates/systemd_job.conf.em index 0b44f63..c2d34af 100644 --- a/templates/systemd_job.conf.em +++ b/templates/systemd_job.conf.em @@ -34,7 +34,6 @@ After=@(systemd_after) [Service] Type=simple ExecStart=/usr/sbin/@(name)-start -TimeoutStopSec=10 [Install] WantedBy=multi-user.target