[Unit]
Description=Slurm REST daemon
After=network-online.target remote-fs.target slurmctld.service
Wants=network-online.target
ConditionPathExists=@sysconfdir@/slurm.conf

[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/slurmrestd
EnvironmentFile=-/etc/default/slurmrestd
# slurmrestd should never run as root or the slurm user.
# Use a drop-in to change the default User and Group to site specific IDs.
User=slurmrestd
Group=slurmrestd
ExecStart=@sbindir@/slurmrestd $SLURMRESTD_OPTIONS
# Enable auth/jwt be default, comment out the line to disable it for slurmrestd
Environment=SLURM_JWT=daemon
# Listen on TCP socket by default.
Environment=SLURMRESTD_LISTEN=:@SLURMRESTD_PORT@
ExecReload=/bin/kill -HUP $MAINPID
LimitMEMLOCK=infinity

[Install]
WantedBy=multi-user.target
