1

I need a system template service with multiple (2) arguments to like this:

[Unit]
Description=Virtualgl Manager for slurm job <jobid>
After=user@<user>.service
Requires=user@<user>.service

[Service] User=<user> Type=oneshot RemainAfterExit=yes Slice=user-<user>.slice

I need to pass in both user and jobid. The jobid is needed so every slurm job has a unique instance but I also need to pass in the the jobs belongs to so the right user@.service is started. The goal of this service is to keep the user@.service alive for the duration of the slurm job like pam-systemd does for ssh sessions so the two can work in parallel.

I've seen systemd - Giving my service multiple arguments for a similar issue but those solutions only works for the service part, not the unit.

0 Answers0