Add all files needed to bring up VM and run agaric.com locally

This commit is contained in:
benjamin melançon 2018-08-20 10:45:20 -04:00
parent 52c8b60bac
commit 4d2bc0ee24
742 changed files with 24037 additions and 0 deletions

View file

@ -0,0 +1,61 @@
#! /bin/sh
# /etc/init.d/mailhog
#
# MailHog init script.
#
# @author Jeff Geerling
### BEGIN INIT INFO
# Provides: mailhog
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start MailHog at boot time.
# Description: Enable MailHog.
### END INIT INFO
PID=/var/run/mailhog.pid
LOCK=/var/lock/mailhog.lock
USER=nobody
BIN={{ mailhog_install_dir }}/mailhog
DAEMONIZE_BIN={{ mailhog_daemonize_bin_path }}
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting mailhog."
$DAEMONIZE_BIN -p $PID -l $LOCK -u $USER $BIN
;;
stop)
if [ -f $PID ]; then
echo "Stopping mailhog.";
kill -TERM $(cat $PID);
rm -f $PID;
else
echo "MailHog is not running.";
fi
;;
restart)
echo "Restarting mailhog."
if [ -f $PID ]; then
kill -TERM $(cat $PID);
rm -f $PID;
fi
$DAEMONIZE_BIN -p $PID -l $LOCK -u $USER $BIN
;;
status)
if [ -f $PID ]; then
echo "MailHog is running.";
else
echo "MailHog is not running.";
exit 3
fi
;;
*)
echo "Usage: /etc/init.d/mailhog {start|stop|status|restart}"
exit 1
;;
esac
exit 0

View file

@ -0,0 +1,12 @@
[Unit]
Description=MailHog Email Catcher
After=syslog.target network.target
[Service]
Type=simple
ExecStart={{ mailhog_install_dir }}/mailhog
StandardOutput=journal
Restart=on-failure
[Install]
WantedBy=multi-user.target