start-stop-daemon

Ansible cannot make dir /$HOME/.ansible/cp

岁酱吖の 提交于 2020-01-01 15:37:48
问题 I'm getting a very strange error when I run ansible: GATHERING FACTS *************************************************************** fatal: [i-0f55b6a4] => Could not make dir /$HOME/.ansible/cp: [Errno 13] Permission denied: '/$HOME' TASK: [Task #1] *************************************************************** FATAL: no hosts matched or all hosts have already failed -- aborting PLAY RECAP ******************************************************************** to retry, use: --limit @/home

Start JBoss 7 as a service on Linux

北城余情 提交于 2019-12-29 02:24:26
问题 Previous versions of JBoss included a scripts (like jboss_init_redhat.sh ) that could be copied to /etc/init.d in order to add it as a service - so it would start on boot up. I can't seem to find any similar scripts in JBoss 7. Has anyone already done something like this? P.S. I'm trying to achieve this in Ubuntu 10.04 回答1: After spending a couple of hours of snooping around I ended up creating /etc/init.d/jboss with the following contents #!/bin/sh ### BEGIN INIT INFO # Provides: jboss #

What is the proper way to terminate a script using start-stop-daemon?

北城余情 提交于 2019-12-25 15:52:36
问题 I am using a start-stop-daemon to make a INIT script for my script. I am using --make-pidfile cause my script doesn't make its own pid. I can start my script using start and pid file generates with appropriate PID. But the stop function doesn't work. I am getting return code 0 with --oknodo and 1 without it. If I do ps -ef | grep perl and cat /home/me/mydaemon/run I always see the same PID. I can terminate the script using kill -15 PID. But not with the stop function of my init script. What

What is the proper way to terminate a script using start-stop-daemon?

冷暖自知 提交于 2019-12-25 15:51:51
问题 I am using a start-stop-daemon to make a INIT script for my script. I am using --make-pidfile cause my script doesn't make its own pid. I can start my script using start and pid file generates with appropriate PID. But the stop function doesn't work. I am getting return code 0 with --oknodo and 1 without it. If I do ps -ef | grep perl and cat /home/me/mydaemon/run I always see the same PID. I can terminate the script using kill -15 PID. But not with the stop function of my init script. What

Start & Stop a ScheduledExecutorService in Java EE environment using servlet

主宰稳场 提交于 2019-12-17 20:51:05
问题 We have a requirement where in we need to monitor remote JVM details via JMX using a simple servlet application. So things done till now in a standalone application is 1) Creat a JMX connector & get the Memory data --> done 2) We need to constantly monitor & get the records (2.1 > which can be considered as scheduled task at constant delay & insert the records into DB Or 2.2> does the JMX gives the history if yes which MBean to access for the info?). Here I am planning to use an interface to

How to process SIGTERM signal gracefully in Java?

北城余情 提交于 2019-12-12 08:51:32
问题 Let's assume we have such a trivial daemon written in java: public class Hellow { /** * @param args the command line arguments */ public static void main(String[] args) { while(true) { // 1. do // 2. some // 3. important // 4. job // 5. sleep } } } and we daemonize it using start-stop-daemon which by default sends SIGTERM (TERM) signal on --stop Let's suppose the current step performed is #2. And at this very moment we're sending TERM signal. What happens is that the execution terminates

Launching command using NSTask returns error

[亡魂溺海] 提交于 2019-12-06 11:00:16
问题 I'd like to launch the following command from my application using NSTask: sudo -u myusername launchctl load /Library/LaunchAgents/com.google.keystone.agent.plist Here is a code I do: NSPipe *pipe = [NSPipe pipe]; NSTask *task = [[NSTask alloc] init]; [task setLaunchPath: @"/bin/sh"]; [task setCurrentDirectoryPath:@"/"]; [task setStandardError:pipe]; NSArray *arguments = nil; arguments = @[@"sudo", @"-u", @"myusername", @"launchctl", @"load", @"/Library/LaunchAgents/com.google.keystone.agent

start-stop-daemon and python

空扰寡人 提交于 2019-12-05 16:53:02
问题 I'm trying to start python script with start-stop-daemon: sudo /sbin/start-stop-daemon --start --pidfile /home/loop.pid \ --user www-data --group www-data -b --make-pidfile --chuid www-data \ --exec /usr/bin/python /home/loop.py --verbose but no python script in my processes. What i do wrong? loop.py: import time while True: print "working..." time.sleep(3) 回答1: I tried your script and command line, and it is working on my machine. Are you sure your script is located at /home/loop.py ? Also,

Ansible cannot make dir /$HOME/.ansible/cp

ε祈祈猫儿з 提交于 2019-12-04 16:52:35
I'm getting a very strange error when I run ansible: GATHERING FACTS *************************************************************** fatal: [i-0f55b6a4] => Could not make dir /$HOME/.ansible/cp: [Errno 13] Permission denied: '/$HOME' TASK: [Task #1] *************************************************************** FATAL: no hosts matched or all hosts have already failed -- aborting PLAY RECAP ******************************************************************** to retry, use: --limit @/home/ubuntu/install.retry i-0f55b6a4 : ok=0 changed=0 unreachable=1 failed=0 Normally, this playbook runs

start-stop-daemon and python

走远了吗. 提交于 2019-12-04 02:14:28
I'm trying to start python script with start-stop-daemon: sudo /sbin/start-stop-daemon --start --pidfile /home/loop.pid \ --user www-data --group www-data -b --make-pidfile --chuid www-data \ --exec /usr/bin/python /home/loop.py --verbose but no python script in my processes. What i do wrong? loop.py: import time while True: print "working..." time.sleep(3) I tried your script and command line, and it is working on my machine. Are you sure your script is located at /home/loop.py ? Also, don't expect to see those prints, because you are specifying the -b (background) option, so the process is