[Unit] Description=qdb: ii IRC logger (oddbot) Documentation=file:///var/gopher/applets/qdb/README.txt After=network.target # If your IRC server is REMOTE you will also run qdb-stunnel.service # (see README.txt); ii still connects to 127.0.0.1 either way, so no # hard dependency is declared here --- Restart=always covers ordering. [Service] Type=simple EnvironmentFile=/var/gopher/applets/qdb/qdb.env # The IRC server (ngircd) runs on this same host, so ii connects to it # over loopback plaintext --- the traffic never leaves the machine. ExecStart=/usr/bin/ii -i %h/irc -s 127.0.0.1 -p ${QDB_LOCAL_PORT} -n ${QDB_IRC_NICK} -f "${QDB_IRC_FULLNAME}" # ii does not auto-join; once it has registered, ask it to join. # NOTE: on a reconnect this join is not re-issued --- restart this # service to rejoin (see README.txt). ExecStartPost=/bin/sh -c 'sleep 8; echo "/j ${QDB_IRC_CHAN}" > %h/irc/127.0.0.1/in' Restart=always RestartSec=10 [Install] WantedBy=default.target