Hello,
I'm using daemontools-0.76_16 on FreeBSD 8.2 release system.
If I try to manage a test.sh script with daemontools (svc -d custommapp | svc -u customapp), It is working correctly. But if I use "java command" shown as below, when send terminate signal with svc -d customapp java application (service: customapp) continuous to work. So with svc -u customapp java application is running correctly but svc -d customapp command is not working for exec java ... command.
/var/service/customapp/run: (start (svc -u) working, stop (svc -d) not working)
/var/service/customapp/log/run:
/var/service/customapp2/run: (start (svc -u) working, stop (svc -d) working)
/tmp/test2.sh:
/var/service/customapp2/log/run:
Questions)
1) Why I can't stop java application with svc -d customapp? (I guess run script's java call creates another process that can't be control by daemontools) How can fix it?
2) I want to log java command output with daemontools's logging mechanism for auto log rotation do I need any extra configuration?
I'm using daemontools-0.76_16 on FreeBSD 8.2 release system.
If I try to manage a test.sh script with daemontools (svc -d custommapp | svc -u customapp), It is working correctly. But if I use "java command" shown as below, when send terminate signal with svc -d customapp java application (service: customapp) continuous to work. So with svc -u customapp java application is running correctly but svc -d customapp command is not working for exec java ... command.
/var/service/customapp/run: (start (svc -u) working, stop (svc -d) not working)
Code:
#!/bin/sh
exec java -cp "/opt/hercules/service/customapp/lib/*" -Xmx512m -DpropertiesConfigs=classpath:system/cmd.properties -Dhercules.jetty.port=1112 -Dimc.db.password=asdtest
/var/service/customapp/log/run:
Code:
#!/bin/sh
exec multilog t ./main
/var/service/customapp2/run: (start (svc -u) working, stop (svc -d) working)
Code:
#!/bin/sh
exec /tmp/test2.sh
/tmp/test2.sh:
Code:
#!/usr/local/bin/bash
echo "Sleeping 1000 seconds..."
sleep 1000
/var/service/customapp2/log/run:
Code:
#!/bin/sh
exec multilog t ./main
Questions)
1) Why I can't stop java application with svc -d customapp? (I guess run script's java call creates another process that can't be control by daemontools) How can fix it?
2) I want to log java command output with daemontools's logging mechanism for auto log rotation do I need any extra configuration?