summaryrefslogtreecommitdiffstats
path: root/vendor/gipfl/systemd/src/systemd.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gipfl/systemd/src/systemd.php')
-rw-r--r--vendor/gipfl/systemd/src/systemd.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/gipfl/systemd/src/systemd.php b/vendor/gipfl/systemd/src/systemd.php
new file mode 100644
index 0000000..7894a8f
--- /dev/null
+++ b/vendor/gipfl/systemd/src/systemd.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace gipfl\SystemD;
+
+class systemd
+{
+ /**
+ * @param null $env
+ * @return bool
+ */
+ public static function startedThisProcess($env = null)
+ {
+ if ($env === null) {
+ $env = $_SERVER;
+ }
+
+ return isset($env['NOTIFY_SOCKET']);
+ }
+}