From 3ebcc561cd1ca236e26266797f385678101730a7 Mon Sep 17 00:00:00 2001 From: "Jason D. McCormick" Date: Tue, 26 Jan 2021 20:00:27 -0500 Subject: [PATCH] systemd scripts for xlxd --- scripts/scripts.readme.txt | 6 ++++++ scripts/xlxd.default | 10 ++++++++++ scripts/xlxd.service | 16 ++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 scripts/xlxd.default create mode 100644 scripts/xlxd.service diff --git a/scripts/scripts.readme.txt b/scripts/scripts.readme.txt index 86bb307b..bbc1e176 100644 --- a/scripts/scripts.readme.txt +++ b/scripts/scripts.readme.txt @@ -3,6 +3,12 @@ *copy ambed.service to /etc/systemd/system/ *copy watchdog to /ambed/ ************************************************* +* If you want to use systemd for xlxd: +* copy xlxd.service to /etc/systemd/system +* copy xlxd.default to /etc/default/xlxd +* edit /etc/default/xlxd to suit the local install +* systemctl daemon-reload +************************************************* * xlxd executable must be in /xlxd/ folder * ambed executable must be in /ambed/ folder ************************************************* diff --git a/scripts/xlxd.default b/scripts/xlxd.default new file mode 100644 index 00000000..ad094c00 --- /dev/null +++ b/scripts/xlxd.default @@ -0,0 +1,10 @@ +# This is used by xlxd.service. Note this is shellcode sourced by xlxd.service + +# Enter XLX name/number here +REFLECTOR="XLXnnn" + +# Enter IP for binding here +BIND_IP="0.0.0.0" + +# Change this is ambed is running on a different host +AMBED_IP="127.0.0.1" diff --git a/scripts/xlxd.service b/scripts/xlxd.service new file mode 100644 index 00000000..9272c238 --- /dev/null +++ b/scripts/xlxd.service @@ -0,0 +1,16 @@ +[Unit] +Description=XLXD Multiprotocol Reflector +After=network.target ambed.service + +[Service] +Type=forking +User=root +Group=root +EnvironmentFile=/etc/default/xlxd +ExecStart=/xlxd/xlxd ${REFLECTOR} ${BIND_IP} ${AMBED_IP} +ExecStartPost=/bin/sh -c 'umask 022; pgrep xlxd > /var/log/xlxd.pid' +Restart=on-abnormal +PIDFile=/var/log/xlxd.pid + +[Install] +WantedBy=multi-user.target