From 67886f809d57c06b8a232cb461801f11e57f68a3 Mon Sep 17 00:00:00 2001 From: Renken Date: Tue, 20 Feb 2024 00:08:52 +0100 Subject: srb2kart: read standard input from socket Drop dependency on byobu, currently the socket solution does not work but it shouldn't be too hard to fix it. --- deploy/shione/srb2kart/deploy.sh | 16 ++++++++++++++-- deploy/shione/srb2kart/srb2kart.service | 7 +++++-- deploy/shione/srb2kart/srb2kart.socket | 3 +++ 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 deploy/shione/srb2kart/srb2kart.socket (limited to 'deploy/shione') diff --git a/deploy/shione/srb2kart/deploy.sh b/deploy/shione/srb2kart/deploy.sh index 0209dd6..6ed1d20 100755 --- a/deploy/shione/srb2kart/deploy.sh +++ b/deploy/shione/srb2kart/deploy.sh @@ -4,5 +4,17 @@ set -eu ./generate_dkartconfig.sh -rsync -a --progress srb2kart.service srb2kart@shione:/home/srb2kart/.config/systemd/user -rsync -a --delete --progress dkartconfig.cfg mods srb2kart@shione:/home/srb2kart/.srb2kart +rsync \ + -a \ + --progress \ + srb2kart.socket \ + srb2kart.service \ + srb2kart@shione:/home/srb2kart/.config/systemd/user + +rsync \ + -a \ + --delete \ + --progress \ + dkartconfig.cfg \ + mods \ + srb2kart@shione:/home/srb2kart/.srb2kart diff --git a/deploy/shione/srb2kart/srb2kart.service b/deploy/shione/srb2kart/srb2kart.service index d9806ba..807b820 100644 --- a/deploy/shione/srb2kart/srb2kart.service +++ b/deploy/shione/srb2kart/srb2kart.service @@ -5,9 +5,12 @@ StartLimitIntervalSec=0 [Service] PermissionsStartOnly=false +Sockets=srb2kart.socket +StandardInput=socket +StandardError=journal Environment=LC_ALL=C -ExecStart=/usr/bin/byobu new-session -ds srb2kart srb2kartd -Type=forking +ExecStart=/home/srb2kart/.local/bin/srb2kart -dedicated +Type=simple RemainAfterExit=false Restart=always RestartSec=1s diff --git a/deploy/shione/srb2kart/srb2kart.socket b/deploy/shione/srb2kart/srb2kart.socket new file mode 100644 index 0000000..a3e355e --- /dev/null +++ b/deploy/shione/srb2kart/srb2kart.socket @@ -0,0 +1,3 @@ +[Socket] +ListenFIFO=%t/srb2kart.stdin +Service=srb2kart.service -- cgit v1.2.3