Introduce init runtime manager
[gpl/argeo-freed.git] / usr / lib / systemd / user / argeo.service
diff --git a/usr/lib/systemd/user/argeo.service b/usr/lib/systemd/user/argeo.service
new file mode 100644 (file)
index 0000000..8534a94
--- /dev/null
@@ -0,0 +1,31 @@
+[Unit]
+Description=Argeo user runtime
+
+[Service]
+Type=simple
+StateDirectory=argeo/slc
+LogsDirectory=argeo/slc
+ConfigurationDirectory=argeo/slc
+CacheDirectory=argeo/slc
+WorkingDirectory=/usr/local/
+EnvironmentFile=/usr/local/etc/default/argeo
+
+# Optional files
+ExecStartPre=/usr/bin/mkdir -p ${CONFIGURATION_DIRECTORY}
+ExecStartPre=/usr/bin/touch ${CONFIGURATION_DIRECTORY}/jvm.args
+
+ExecStart=java \
+-Dosgi.framework.useSystemProperties=false \
+-Dosgi.noShutdown=true \
+-Declipse.ignoreApp=true \
+@etc/argeo/user/jvm.args \
+@${CONFIGURATION_DIRECTORY}/jvm.args \
+@lib/argeo/jvm.args \
+org.argeo.init.RuntimeManager \
+etc/argeo/user/slc
+
+# Exit codes of the JVM when SIGTERM or SIGINT have been caught:
+SuccessExitStatus=143 130
+
+[Install]
+WantedBy=multi-user.target