I've used Apache Commons Daemon in my projects

On windows I had following registration .bat to run it as service:

@echo off
cd /D "$INSTALL_PATH\sbin"

SET UHOME=$INSTALL_PATH
SET UMAINCLASS=myprog.main

SET ULOGDIR=%UHOME%\var\log
MKDIR %UHOME%\var\tmp\myprog\
MKDIR %ULOGDIR%

%UHOME%\sbin\%PROCESSOR_ARCHITECTURE%\myprog.exe //IS//Myprog
--DisplayName="Myprog"
--Install=%UHOME%\sbin\%PROCESSOR_ARCHITECTURE%\myprog.exe --Jvm=auto
--Startup=auto --StartPath=%UHOME%\sbin  --StartMode=jvm
--StopMode=jvm --StartClass=%UMAINCLASS% --StartMethod=main
--StartParams=start --StopMode=jvm --StopClass=%UMAINCLASS%
--StopMethod=main --StopParams=stop --LogPath=%ULOGDIR%
--StdOutput=auto --StdError=auto
--Classpath=%UHOME%\lib\myprog-0.1-jar-with-dependencies.jar
--JvmOptions=-Djava.library.path=%UHOME%\lib;-Dwservice.configuration=..\etc\wservice.properties;-Dlog4j.defaultInitOverride=true;-Dlog4j.configuration=..\etc\log4j.properties

sc start Myprog

on Linux I just followed instructions from ACD page


On Wed, Sep 7, 2011 at 4:26 PM, Marko Kocić <marko.ko...@gmail.com> wrote:
> While we are at this topic, how do you run Clojure deamons. Do you have some
> scripts to set it up how?
> Is there a simple way to daemonize lein project?
> Regards,
> Marko
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



-- 
With best wishes,                    Alex Ott
http://alexott.net/
Tiwtter: alexott_en (English), alexott (Russian)
Skype: alex.ott

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to