diff options
Diffstat (limited to 'systemd/install.sh')
| -rwxr-xr-x | systemd/install.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/systemd/install.sh b/systemd/install.sh new file mode 100755 index 0000000..0a118b7 --- /dev/null +++ b/systemd/install.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# Install & enable the idatui-mcp user service. Re-run after editing the unit. +set -eu + +UNIT=idatui-mcp.service +SRC=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/$UNIT +DEST_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user" + +mkdir -p "$DEST_DIR" +ln -sf "$SRC" "$DEST_DIR/$UNIT" + +# Keep the service alive after logout / across reboots without a login session. +loginctl enable-linger "$(id -un)" || true + +systemctl --user daemon-reload +systemctl --user enable --now "$UNIT" + +echo +echo "Installed. Handy commands:" +echo " systemctl --user status idatui-mcp" +echo " systemctl --user restart idatui-mcp" +echo " journalctl --user -u idatui-mcp -f" +echo " systemctl --user edit idatui-mcp # drop-in overrides (ports, workers)" |
