controller sync as a POSIX script (the unit's inline shell used bash-only syntax)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
c81b498df1
commit
1452b79218
3 files changed
+19
-4
No files matched your search
@@ -6,7 +6,4 @@ After=rollcall.service
|
||||
Type=oneshot
|
||||
# PROFILE is the profile whose overlay carries slurm.conf
|
||||
Environment=PROFILE=compute
|
||||
ExecStart=/bin/sh -c 'set -e; new=$(/usr/local/bin/rollcall render "$PROFILE" etc/slurm/slurm.conf) || exit 0; \
|
||||
if ! printf "%%s\n" "$new" | grep -v "^# rendered by rollcall" | cmp -s - <(grep -v "^# rendered by rollcall" /etc/slurm/slurm.conf 2>/dev/null); then \
|
||||
printf "%%s\n" "$new" > /etc/slurm/slurm.conf.new && mv /etc/slurm/slurm.conf.new /etc/slurm/slurm.conf; \
|
||||
systemctl try-restart slurmctld.service; echo "slurm.conf updated"; fi'
|
||||
ExecStart=/usr/local/bin/rollcall-controller-sync.sh
|
||||
Reference in new issue
Block a user