Launching irssi at Boot

    Recently I've been trying to figure out how to get irssi to load when my system boots, so all of my channels and scripts are ready before I even log in, and I can just type "screen -drU" and roll. After asking my friends on IRC, I was pointed to /etc/rcS.d/S80bootmisc.sh, which appears to be a handy place for tossing random commands you want run at boot.

    Since boot scripts are run as root, I need to run screen and irssi as my user, I tried using sudo but got some oddities with it not properly setting up my user enviormnent, leaving me without my .screenrc customizations. I found that using su -c instead of sudo worked, so big deal. Anyways, add the following to the end of /etc/rcS.d/S80bootmisc.sh's do_start() function, if you don't know how then you probably shouldn't be trying to get irssi to run on boot anyways.

su -c'screen -dm irssi' -l USERNAME

    The -dm arguments to screen tell it to create a new detached session, since we don't want it to even attempt attaching we might as well do that instead of having it either error out or hang the boot process. In addition I added '-cFreenode' to the end of the command, so irssi would automatically connect to Freenode and join my channels when it starts up.

So now all of you that wanted irssi to start automagically to keep logs, or so you can avoid remembering to restart your irssi proxy when you reboot your server, or whatever, know how.

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options