Skip to content

Instantly share code, notes, and snippets.

@drye
Last active April 12, 2024 10:38
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save drye/5520101 to your computer and use it in GitHub Desktop.
Save drye/5520101 to your computer and use it in GitHub Desktop.
Start Irssi with Screen on startup on Arch Linux on Raspberry PI

Start Irssi with Screen on startup on Arch Linux on Raspberry PI

Put this in the file /etc/systemd/system/irssiscreen@.service

[Unit]
Description=irssiscreen
After=network.target

[Service]
Type=forking
User=%i
ExecStart=/usr/bin/screen -dmS ircsess irssi
ExecStop=/usr/bin/screen -S ircsess -X quit

[Install]
WantedBy=multi-user.target

Enable the service with:

sudo systemctl enable irssiscreen@yourusername.service

To reattach, simply run:

screen -rd
@Damacustas
Copy link

If you replace
ExecStop=/usr/bin/screen -S ircsess -X quit
with
ExecStop=/usr/bin/screen -S ircsess -X stuff '/quit\n'

irssi will receive and process the /quit command, meaning the client will cleanly disconnect from connected services. I find this to be a nicer way of shutting down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment