Skip to content

Commit

Permalink
Add systemd unit for asynchroneous tasks (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierba authored and David Coutadeur committed Jan 8, 2024
1 parent a7d867d commit 310c94a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/install/lib/systemd/system/lsc.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[Unit]
Description=LSC server
After=network.target

[Service]
Type=forking
User=lsc
Group=lsc
PIDFile=/run/lsc.pid
Environment="LSC_CONFIG_DIR=/etc/lsc"
Environment="LSC_ASYNC_TASKS=-a all"
Environment="LSC_EXTRA_ARGS="
Environment="LSC_JMXPORT="
EnvironmentFile=-/etc/default/lsc
ExecStartPre=/usr/bin/lsc -v -f ${LSC_CONFIG_DIR}
ExecStart=/usr/bin/lsc -f ${LSC_CONFIG_DIR} ${LSC_ASYNC_TASKS} ${LSC_EXTRA_ARGS}

PrivateTmp=true
PrivateDevices=true
ProtectSystem=strict
ProtectKernelTunables=yes
ProtectControlGroups=yes
ReadWritePaths=/var/log/lsc
UMask=0007

[Install]
WantedBy=multi-user.target

0 comments on commit 310c94a

Please sign in to comment.