Questions tagged [daemons]

Daemons provides an easy way to wrap existing ruby scripts (for example a self-written server) to be run as a daemon and to be controlled by simple start/stop/restart commands.

105 questions
1
vote
2 answers

Shell script to rsync a file every week without cronjob (school assignement)

#!/bin/bash z=1 b=$(date) while [[ $z -eq 1 ]] do a=$(date) if [ "$a" == "$b" ] then b=$(date -d "+7 days") rsync -v -e ssh user@ip_address:~/sample.tgz…
kartik
  • 55
  • 4
1
vote
0 answers

Connection between group of daemons and main process - mkfifo

I was trying to connect daemons (group of daemons without a leader) with main process as in title, the problem is that i have to send statement from each daemon(which are supporting SIGUSR1 signal) to main process, but i don' t even know how to do…
Jorgusss
  • 7
  • 1
  • 3
1
vote
1 answer

Daemonizing a rake task in ruby. Best solution?

I have a rake task that polls an Amazon SQS queue indefinitely, which needs to be kept alive on a server. What would be the best solution for doing this? Any decent, maintained gems for daemonizing, that would be a good solution to this problem? Any…
JK14
  • 11
  • 2
1
vote
2 answers

Rufus-Scheduler, DaemonKit and traps

I daemonized a Ruby scheduler script (using Rufus) with Rufus-Scheduler DaemonKit and I'm trying to trap the TERM or INT signals to have the application try to save state before quitting. DaemonKit has its own trap_state (private) method and it…
blackbird
  • 1,129
  • 1
  • 23
  • 48
1
vote
0 answers

How to run two same kind of daemons on a single linux machine

In Ubuntu 14.04 or Debian Wheezy, Can I run two daemons of same type in a single machine? I already tried to do that, by creating separate config files under /etc/init.d/ , /usr/bin/, Created separate symbolic links under /etc/rc[0-6].d/ for…
ganeshkaila
  • 123
  • 2
  • 10
1
vote
2 answers

c++ Initialize global object AFTER fork

I have a program that uses a work queue to execute tasks, and is supposed to run as a daemon. I had been achieving this using the following code: bool seedDaemon() { using namespace std; int childpid = 0; pid_t pid = 0; …
Oblivious12
  • 61
  • 1
  • 7
1
vote
0 answers

Python daemon status is unknown

I have created a python daemon by a Tutorial and it is running just as tutorial example has. But there are problems: The output of service --status-all says: [ ? ] testdaemon Can anyone help me to find out what those errors and warnings are or…
Parisa
  • 83
  • 1
  • 9
1
vote
1 answer

Ruby Daemons Gem

I installed the ruby gem Daemons. To make sure it was working I created a script that would print to a file every 5 seconds. I then created another file to run the script using the trivial example they give you in the readme located at…
tonywok
  • 13
  • 1
  • 3
1
vote
0 answers

How to call InetD on PORT and call PHP file

I want to listen a port using my PHP code. Can I use InetD to call my PHP file when some data comes on a particular port?
1
vote
0 answers

ruby 'daemonized' script presenting unexpected issues

I have here a script that has suddenly changed behavior and I can't work out why. As far as I know, no changes to the script have been made and neither have any changes to rubies or gems. First of all, here is the script: require 'rubygems' require…
user1706938
  • 131
  • 1
  • 9
1
vote
1 answer

Did I relaunch / reconfigure every launchctl daemon here?

I accidentally issue the following command: launchctl load -w /System/Library/LaunchDaemons/ The output: bind(): Address already in use bind(): Address already in use bind(): Address already in use bind(): Address already in…
Marcel
  • 1,266
  • 7
  • 18
1
vote
1 answer

Streaming, Daemons, Cronjobs, how do you use them? (in Ruby)

I've finally had a second to look into streaming, daemons, and cron tasks and all the neat gems built around them! But I'm not clear on how/when to use these things. I have a few questions: 1) If I wanted to have a website that stayed constantly…
Lance
  • 75,200
  • 93
  • 289
  • 503
1
vote
1 answer

Abort trap from AppleScript run from a Ruby script

I have a Ruby program that, amongst other things, executes user-defined blocks of code (the code is on Github, here). Many of these blocks contain system commands, and I'm trying to debug a very specific case of executing a piece of AppleScript…
Jon Cairns
  • 11,783
  • 4
  • 39
  • 66
1
vote
1 answer

Differing daemon implementations

I'm relatively new to python and I've only skimmed the surface of programming so far, which is why I'm confused about daemons. I generally know what they do, but I'm not sure what the best way to implement them is in python. I found this link which…
Lobabob
  • 132
  • 8
0
votes
3 answers

What's the best option for a framework-agnostic Ruby background worker library?

I'm building a simple recipe search engine with Ruby and Sinatra for an iPhone app, using RabbitMQ for my message queue. I'm looking around and finding a lot of different implementation choices for background processes, but most of them either…
Bob Aman
  • 32,839
  • 9
  • 71
  • 95