Bjoern Olausson

IRSSI init script PDF Print E-mail
  
Friday, 09 November 2007 15:00

If you are at work and you do not have access to the IRC net from there, or you are not able to install a irc client on the machine you are working with, no problem.

If you have a server to which you have access through SSH you can run an IRC-Client like irssi on the server an connect to it via ssh.

Here is a init-script which starts irssi in a screen called "irssi" as the user "user" and group "group". To this running screen you can connect via SSH.

#!/sbin/runscript
# Copyright 1999-2002 Bjoern Olausson,

Dedepend() {
        net net.eth0 net.eth1 shorewall
}
start() {
        ebegin "Starting IRSSI in a screen called irssi as user blub"
        start-stop-daemon --start \
                --background --chuid user:group \
                --exec /usr/bin/screen \
                -- -AmdS irssi /usr/bin/irssi
        sleep 5
        pidof /usr/bin/irssi > /var/run/irssi_screen.pid
        eend ${?}
}

stop() {
        ebegin "Stopping IRSSI"
        start-stop-daemon --stop --pidfile /var/run/irssi_screen.pid
        rm /var/run/irssi_screen.pid
        eend ${?}
}

To connect to the screen use the following command:
ssh -l <user> -t <host> screen -dr irssi

 

 

Add comment


Security code
Refresh