Skip to content

clojure-cookbook/my-daemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple Apache Commons Daemon compliant Clojure application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published