Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Damacustas commented Oct 18, 2015

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