Skip to content

Instantly share code, notes, and snippets.

@rizumu
Created September 21, 2011 23:50
Show Gist options
  • Save rizumu/1233650 to your computer and use it in GitHub Desktop.
Save rizumu/1233650 to your computer and use it in GitHub Desktop.
install irssi
def install_irssi():
sudo("apt-get install -y screen irssi bitlbee libcrypt-dh-perl libcrypt-openssl-bignum-perl libcrypt-blowfish-perl")
# libtime-duration-perl libnotify-bin irssi-plugin-otr bitlbee-plugin-otr")
server_ip = env.host_string.split(":")[0]
local("rsync --links -e 'ssh -p {0}' -avzp ~/.irssi/ {1}@{2}:{3}.irssi/ \
--exclude='*.log'".format(settings.SSH_PORT, settings.DEPLOY_USERNAME, server_ip, settings.DEPLOY_HOME))
sed("{0}.irssi/config".format(settings.DEPLOY_HOME), "BITLBEE_PASSWORD", os.environ["BITLBEE_PASSWORD"])
with fab_settings(warn_only=True):
put("~/.screenrc", os.path.join(settings.DEPLOY_HOME, ".screenrc"))
put("~/dotfiles/bitlbee.conf", "/etc/bitlbee/bitlbee.conf", use_sudo=True)
sudo("chown root:bitlbee /etc/bitlbee/bitlbee.conf && chmod 640 /etc/bitlbee/bitlbee.conf")
run("mkdir --parents {0}".format(os.path.join(settings.DEPLOY_HOME, ".terminfo/r/")))
put("/usr/share/terminfo/r/rxvt-unicode-256color", os.path.join(settings.DEPLOY_HOME, ".terminfo/r/rxvt-unicode-256color"))
if not exists("/usr/share/ca-certificates/gandi.net/"):
sudo("mkdir /usr/share/ca-certificates/gandi.net/")
with cd("/usr/share/ca-certificates/gandi.net/"):
sudo("wget http://crt.gandi.net/GandiStandardSSLCA.crt")
sudo("openssl x509 -inform der -outform pem < /usr/share/ca-certificates/gandi.net/GandiStandardSSLCA.crt > GandiStandardSSLCA.pem")
sudo("ln -sf /usr/share/ca-certificates/gandi.net/GandiStandardSSLCA.pem /etc/ssl/certs/GandiStandardSSLCA.pem")
def remove_irssi():
sudo("apt-get remove -y irssi bitlbee libcrypt-dh-perl libcrypt-openssl-bignum-perl libcrypt-blowfish-perl")
sudo("rm -rf {0}.irssi/".format(settings.DEPLOY_HOME))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment