#!/bin/sh -e
if [ "$1" = "configure" ]; then
- update-alternatives --install /usr/bin/pico pico /usr/bin/nano 50 \
- --slave /usr/share/man/man1/pico.1.gz pico.1.gz /usr/share/man/man1/nano.1.gz
+ update-alternatives --install /usr/bin/pine pine /usr/bin/alpine 50 \
+ --slave /usr/share/man/man1/pine.1.gz pine.1.gz /usr/share/man/man1/alpine.1.gz
+fi
+
+if [ ! -f /etc/pine.conf ]; then
+ echo "CN: Creating configuration file /etc/pine.conf..."
+ touch /etc/pine.conf
+fi
+
+if ! grep -q ^smtp-server /etc/pine.conf; then
+ echo "CN: Adding smtp-server to /etc/pine.conf..."
+ echo smtp-server=localhost >> /etc/pine.conf
fi