[Unit]
Description=Starts/stops the submit server daemon
After=syslog.target time-sync.target jobcachesimtools.service

[Service]
Type=forking
ExecStart=/usr/sbin/submit-server.py
PIDFile=/var/run/submit/submit-server.pid
PermissionsStartOnly=true
ExecStartPre=/usr/bin/install --owner root --group gridman --mode 0774 --directory /var/run/submit
Environment=PYTHONUNBUFFERED=1
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=SUBMITSERVER
#Environment=SUBMITSERVERLOGLEVEL=INFO
#Environment=DISTRIBUTORLOGLEVEL=INFO
#Environment=DISTRIBUTORSYSLOGLOCAL=LOCAL3
#Environment=DISTRIBUTORSYSLOGIDENTIFIER=SUBMITDISTRIBUTOR
#Environment=JOBKILLLOGLEVEL=ERROR
#Environment=JOBSTATUSLOGLEVEL=ERROR
#Environment=VENUESTATUSLOGLEVEL=ERROR
#Environment=SUBMITSERVERSYSLOGLOCAL=LOCAL3
#Environment=SUBMITSERVERSYSLOGIDENTIFIER=SUBMITSERVER
#Environment=SUBMITSERVERPIDFILE=/var/run/submit/submit-server.pid
#Environment=CONFIGURATIONDIRECTORY=/etc/submit
#Environment=SUBMITCONFIGURATIONFILE=submit-server.conf
#Environment=DISTRIBUTORCONFIGURATIONFILE=distributor.conf
#Environment=INFOSDIRECTORY=/etc/submit
#Environment=INFOSCONFIGURATIONFILE=infos.conf
#Environment=DAEMONSDIRECTORY=/etc/submit
#Environment=DAEMONSCONFIGURATIONFILE=infos.conf
#Environment=DISTRIBUTORDIRECTORY=/opt/submit
#Environment=DISTRIBUTORSCRIPT=distributor
#Environment=HARVESTERDIRECTORY=/opt/submit
#Environment=HARVESTERSCRIPT=harvester.py
#Environment=JOBSTATUSDIRECTORY=/opt/submit
#Environment=JOBSTATUSSCRIPT=jobStatus.py
#Environment=JOBKILLDIRECTORY=/opt/submit
#Environment=JOBKILLSCRIPT=jobKill.py
#Environment=VENUEPROBEDIRECTORY=/opt/submit
#Environment=VENUEPROBESCRIPT=venueProbeR.py

[Install]
WantedBy=multi-user.target

