[Unit] Description=SACC4 {{ item.name }} Service After=network.target [Service] Type=simple User=osiris Group=duat WorkingDirectory=/opt/sacc4/{{ item.name }}/current ExecStart=/usr/bin/java -jar /opt/sacc4/{{ item.name }}/current/{{ item.name }}.jar ExecStop=/bin/kill -15 $MAINPID Restart=on-failure RestartSec=10 StandardOutput=append:/var/log/sacc4/{{ item.name }}/{{ item.name }}-service.log StandardError=append:/var/log/sacc4/{{ item.name }}/{{ item.name }}-error.log # LĂ­mites de recursos MemoryLimit=512M CPUQuota=50% # Variables de entorno EnvironmentFile=/etc/sacc4/sacc4.env Environment="SERVER_PORT={{ item.port }}" Environment="LOG_PATH=/var/log/sacc4/{{ item.name }}/{{ item.name }}.log" [Install] WantedBy=multi-user.target