Auto Boot

Note: MailArchiva should be configured to automatically boot by default. The instructions below are retained for record keeping purposes only.

 

Save the below as /opt/mailarchiva/server/mailarchiva
 

# MailArchiva auto-start
#
# description: Auto-starts mailarchiva
# processname: mailarchiva
# pidfile: /var/run/mailarchiva.pid
case $1 in
start)
        sh /opt/mailarchiva/server/startserver
        ;;
stop)  
        sh /opt/mailarchiva/server/stopserver
        ;;
restart)
        sh /opt/mailarchiva/server/startserver
        sh /opt/mailarchiva/server/stopserver
        ;;
esac   
exit 0


Then, type the following:
 

cp /opt/mailarchiva/server/mailarchiva /etc/init.d
chmod +x /etc/init.d/mailarchiva
sudo ln -s /etc/init.d/mailarchiva /etc/rc1.d/K99mailarchiva
sudo ln -s /etc/init.d/mailarchiva /etc/rc2.d/S99mailarchiva
© 2005 - 2024 ProProfs

Found this information useful? Visit mailarchiva.com to learn more about MailArchiva.

-