From: Christian Heller Date: Tue, 29 Sep 2015 00:24:18 +0000 (+0200) Subject: In server config, fix auto start up of irssi screen. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/templates?a=commitdiff_plain;h=b6d87f0183e52a93a211ef73b25828a9ae1e272c;p=config In server config, fix auto start up of irssi screen. --- diff --git a/jessie_start_server.sh b/jessie_start_server.sh index fe08c0e..bf56165 100755 --- a/jessie_start_server.sh +++ b/jessie_start_server.sh @@ -78,21 +78,32 @@ su plom -c 'mkdir -p /home/plom/.vimbackups/' # Set up openssh-server. apt-get -y install openssh-server +# Set up mail client system. +apt-get -y install getmail4 procmail mutt +su plom -c 'mkdir -p /home/plom/mail' +su plom -c 'mkdir -p /home/plom/mail/inbox/{cur,new,tmp}' + # Set up screen. apt-get -y install screen # Set up irssi. apt-get -y install irssi -su plom -c 'screen -S irssi' -su plom -c 'screen -S irssi -X stuff "irssi\n"' - -# Set up mail client system. -apt-get -y install getmail4 procmail mutt -su plom -c 'mkdir -p /home/plom/mail' -su plom -c 'mkdir -p /home/plom/mail/inbox/{cur,new,tmp}' # Clean up. rm jessie_start_server.sh +cat > /etc/systemd/system/irssi.service << EOF +[Unit] +Description=irssi screen + +[Service] +Type=forking +User=plom +ExecStart=/bin/sh /home/plom/config/other/screen-irssi.sh + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable /etc/systemd/system/irssi.service # Set password for user. passwd plom diff --git a/other/screen-irssi.sh b/other/screen-irssi.sh new file mode 100644 index 0000000..0bfdd4a --- /dev/null +++ b/other/screen-irssi.sh @@ -0,0 +1,3 @@ +#!/bin/sh +screen -d -m -S irssi +screen -S irssi -X stuff 'irssi\n'