From 47a2395e2233e3a77375dec0644184b0def6a383 Mon Sep 17 00:00:00 2001 From: Cvar1984 Date: Wed, 7 Aug 2024 11:12:50 +0700 Subject: [PATCH] start service with environment variable --- examples/systemd-root-shell/README.md | 3 ++- examples/systemd-root-shell/gs-root-shell.service | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/systemd-root-shell/README.md b/examples/systemd-root-shell/README.md index 24139b7a..6fb20d5d 100644 --- a/examples/systemd-root-shell/README.md +++ b/examples/systemd-root-shell/README.md @@ -18,11 +18,12 @@ Description=Global Socket Root Shell After=network.target [Service] +Environment="GS_ARGS=-k /etc/systemd/gs-root-shell-key.txt -il" Type=simple Restart=always RestartSec=10 WorkingDirectory=/root -ExecStart=gs-netcat -k /etc/systemd/gs-root-shell-key.txt -il +ExecStart=gs-netcat [Install] WantedBy=multi-user.target diff --git a/examples/systemd-root-shell/gs-root-shell.service b/examples/systemd-root-shell/gs-root-shell.service index 5b0e9a1b..4960a981 100644 --- a/examples/systemd-root-shell/gs-root-shell.service +++ b/examples/systemd-root-shell/gs-root-shell.service @@ -3,11 +3,12 @@ Description=Global Socket Root Shell After=network.target [Service] +Environment="GS_ARGS=-k /etc/systemd/gs-root-shell-key.txt -il" Type=simple Restart=always RestartSec=10 WorkingDirectory=/root -ExecStart=gs-netcat -k /etc/systemd/gs-root-shell-key.txt -il +ExecStart=gs-netcat [Install] WantedBy=multi-user.target