Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1 KB

README.md

File metadata and controls

45 lines (31 loc) · 1 KB

my-daemon

A simple Apache Commons Daemon-compliant Clojure application. See the accompanying recipe in the Clojure Cookbook.

Usage

To run the application as a daemon, install jsvc or procrun (untested) and execute the following commands:

$ lein uberjar
Created /tmp/my-daemon/target/my-daemon-0.1.0-SNAPSHOT.jar
Created /tmp/my-daemon/target/my-daemon-0.1.0-SNAPSHOT-standalone.jar

$ sudo jsvc -java-home "$JAVA_HOME" \
            -cp "$(pwd)/target/my-daemon-0.1.0-SNAPSHOT-standalone.jar" \
            -outfile "$(pwd)/out.txt" \
            my_daemon.core

# Or...

$ make
$ make start

To stop the application:

$ sudo jsvc -java-home "$JAVA_HOME" \
            -cp "$(pwd)/target/my-daemon-0.1.0-SNAPSHOT-standalone.jar" \
            -stop \
            my_daemon.core

# Or ...

$ make stop

License

Copyright © 2013 O'Reilly Media, Ryan Neufeld

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.