Skip to content

l0stman/Hunchentoot-daemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

These scripts launch hunchentoot as a daemon at startup under FreeBSD
7.2 using detachtty (http://www.cliki.net/detachtty).  We could attach
to the lisp process to launch a swank server for slime to connect to.

First you need to create the user htoot which runs the hunchentoot web
server.  Its home directory is /var/lib/hunchentoot and it has no
login shell.  The files startup.lisp, core.lisp, htoot.conf and
htootd should be placed in the directory /var/lib/hunchentoot and the
file hunchentoot under /etc/rc.d.

Make sure that the directory /var/lib/hunchentoot is readable and
executable only by htoot and that this user owns all the files under
this directory.

* patch-src-attachtty.c:

        This patched version of attachtty allows to pass code to a
        detached lisp process and set timeouts
        (http://common-lisp.net/project/bese/repos/detachtty).  If you
        install detachtty using the ports collection, you just need to
        place this file in the directory
        /usr/ports/misc/detachtty/files.

* core.lisp:

        Creates a custom core file for sbcl to speed up the launch of
        the web server and the swank server.

* startup.lisp:

        Contains the procedures that launch hunchentoot and a swank
        server.

* htoot.conf:

        Contains the general configurations of the hunchentoot daemon
        on the system.

* htootd:

        The hunchentoot daemon itself.  Make sure that this file is
        executable only by htoot.  It could take 5 kind of arguments:
        - start: to start the hunchentoot web server.
        - swank: to start a swank server so we could connect to the
        server with slime using: emacs --eval '(slime-connect
        "127.0.0.1" 4005)' at the command line or 'M-x slime-connect
        RET RET' within emacs.  Use slime-disconnect when you're done
        and the swank server would shut down itself leaving
        hunchentoot running.
        - attach: to attach to the detached lisp process running
        hunchentoot.
        - log: to see the latest entries in the log
        file.
        - stop: stop hunchentoot and do some cleanup.

* hunchentoot:

        rc script for the hunchentoot daemon htootd.  It runs
        hunchentoot as the user htoot and not as root.  You could add
        the entry hunchentoot_enable="YES" in /etc/rc.conf to launch
        hunchentoot automatically at startup.  To create a swank
        server you could execute the command:
        > sudo /etc/rc.d/hunchentoot swank
        or
        > sudo /etc/rc.d/hunchentoot stop
        to stop it.

* install.sh:

        Create the user and group for Hunchentoot and install the
        different scripts.

About

Startup scripts for hunchentoot on FreeBSD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published