107 questions
1
vote
0
answers
202
views
Library libuv expecting stdin, stout, stderr to be open, but for the daemons we should close the stdin and stdout as a standard practice
For the daemon processes, it is a standard practice to flcose(stdin); fclose(stdout);, same is there in the application code, and then we are trying to use dnsutility /usr/bin/host to resolve host ...
0
votes
0
answers
38
views
writing unit tests for rails app, which consider testing the app daemons too
I've got a Rails app that incorporates some daemons. Unfortunately, I haven't written unit tests for the app yet. I've recently decided to rectify that, but I'm facing a challenge—I can't figure out a ...
0
votes
0
answers
40
views
run a npx from plist of global daemons of mac os m1
this is what i want to run
its test on cypress that runs four times in a day to do something in another webpage for me
there is not possible to run npm or npx from plist to lauchdaemon or launchagents ...
1
vote
0
answers
174
views
macOS daemon displays GUI?
To learn about macOS services (daemons and agents), I have a sample GUI app which counts every 10 sec in the background and displays some UI.
In AppDelegate.swift
class AppDelegate: NSObject, ...
0
votes
1
answer
1k
views
How to call sidekiq perform fuction after every five minutes in rails
require 'sidekiq'
module KYC
module VerifyInvestor
class AccreditedVerificationWorker
include Sidekiq::Worker
def perform()
....
end
end
end
end
0
votes
1
answer
643
views
Performant Systemd Socket Setup
I need to set up a client server on a Linux system such that the client sends the server data from multiple files. My plan was to write a server daemon that opened up a listening port for clients to ...
2
votes
0
answers
268
views
support time namespace for ubuntu with systemd use
I have Ubuntu 21.04, and need to support systemd for minikube use.
For minikube support, which needs the systemd (also calls systemctl), I found a workaround solution for adding systemd deamon support ...
1
vote
0
answers
32
views
kill a thread depending on existing of main_thread
I want to create an endless thread with python3.7 that receives an input signal in the background. It should stop when my program, so main stops.
I set my thread to daemon=True but it just continues ...
1
vote
1
answer
290
views
Keep publishing data via publisher RabbitMQ (ruby bunny)
I have a RabbitMQ with bunny working using consumer.rb and publisher.rb. If I run
ruby consumer.rb
and then
publisher.rb
I get data being published (data coming from another class). Data ...
0
votes
1
answer
73
views
Checking if a file exists isn't working in a startup daemon [duplicate]
Okay, so I have a headless Raspberry Pi and I long ago created a daemon to make it play a sound effect when it boots up so I know it's (hopefully) ready for an SSH connection.
#!/bin/sh
### BEGIN ...
1
vote
2
answers
537
views
Daemonizing Celery--No module named 'celery' error
I'm trying to daemonize Celery 4.3.0 on Ubuntu 18 following the official documentation. This is for a Django project to off-load intensive tasks.
When the server is running the celery.service should ...
0
votes
0
answers
207
views
Get daemon status programmatically on macOS using Qt
I need to query my daemon status from system tray application using Qt. Can't find any solution to do that.
For the Windows part I can use Win32 API: OpenSCManager -> OpenService -> ...
0
votes
1
answer
3k
views
How to create mac application, which will be always running in the background and collects Location?
I need to know how to create an application which will always be running in the background and collects location info once every 10 minutes. I don't know much about launch agents and daemons.
I have ...
2
votes
1
answer
269
views
Ruby script can't open SQLite3 file, but only when running as a Daemon
I'm running a script (running on an AWS EC2 instance) that continually pulls state legislative data from an API, and persists it to a SQLite3 .db file. When I try to run the script as a daemon in the ...
0
votes
1
answer
49
views
Java Linux Daemons/Services with Server Side Input
I have a java executable that runs a service. It allows the admin to input commands while the service is running. It usually requires an open terminal to run. I connect to my server via ssh.
I can ...
1
vote
0
answers
85
views
How many processes should my daemon have?
I have an ubuntu server with a nuxt.js app (Vue.js).
On deploy I build the app and I have a daemon which runs and which I kill at the end of the deployment (so it restarts basically).
My question is:...
0
votes
1
answer
322
views
Where are logs for Daemons of my ruby script
I have demamonized my ruby script like this
Daemons.run('script/meeting_receiver.rb')
basically i am using gem https://github.com/thuehlinger/daemons.
And i have used puts statements in my ruby ...
4
votes
2
answers
2k
views
Ruby's `.present?` without Rails?
I'm developing a "Rails-less" Ruby daemon for automation (although in theory it runs within a Rails directory). For general purposes and the principle of the matter, I would like to find the (most) "...
0
votes
1
answer
281
views
Extending Daemon class by two subclasses does not work
this is the daemon class i am using
it is acting as a base class which i want to spawn 2 seperate daemons from another controller file
class Daemon:
"""A generic daemon class.
Usage: ...
0
votes
2
answers
3k
views
How to run artisan command in background Ubuntu 17.10
I am trying with putty below command and its working
php artisan horizon
But if I close ssh (putty) this command automatically shut down.
I want to run this command always in the background.
2
votes
2
answers
1k
views
ValueError: Attempted relative import in non-package for running standalone scripts In Flask Web App
I have flask web app and its structure is as follows:
/app
/__init__.py
/wsgi.py
/app
/__init__.py
/views.py
/models.py
/method.py
/common....
0
votes
1
answer
154
views
How to allow sinatra poll for data smartly
I am wanting to design an application where the back end is constantly polling different sensors while the front end (sinatra) allows for this data to be viewed either via json api, or by simply ...
2
votes
2
answers
935
views
Azure AD - Multi-Tenant with Daemon Service and Authorization Code Grant flow, can a target tenant generate a client_secret?
I am working with Azure AD through OAuth 2.0 protocol and also creating a Service/ Dameon application to handle the authentication process for Microsoft Graph SDK. For the service/daemon, I make a ...
1
vote
1
answer
1k
views
How to start a daemon in python using multiprocessing
I want to start a daemon process using multiprocessing exiting the main thread. I wrote this code:
import multiprocessing as mp
from time import sleep
def mytarget():
while True:
print "...
1
vote
1
answer
1k
views
Start Docker Daemon as other user
Guys, I need to start docker daemon as other user under my Ubuntu 14.04..
I have this user in the sudoers' group and in the docker's group, but, what I need is the docker daemon running as my "test" ...
3
votes
1
answer
3k
views
Python: kill all processes of a pool
I have a function foo() that creates multiple objects. This function is called several times during the run of my progam. In order to speed up my code, I want to make foo() create a set of processes, ...
1
vote
0
answers
88
views
Communication from Daemon-to-Binary Applications Design for Mac OS X
I am Designing an application that requires a Command Line Application binary to use for remote/local usage. The application will have plugins that will allow for addition and removal by the user.
...
1
vote
2
answers
603
views
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 ...
-1
votes
1
answer
153
views
Best way to do a ruby process as a daemon [duplicate]
What is the best way to do a ruby process as a background system daemon in Debian?
These daemons are telecom billing process read from many database sources, which write one at a time and to a log ...
1
vote
0
answers
148
views
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 ...
0
votes
2
answers
159
views
Add logs in different directory using daemon in ruby
I am using daemon to wrap my script and has specified logs location into that :
Script looks like this :
#!/usr/local/bin/ruby
require 'rubygems'
require 'daemons'
Daemons.run_proc(
'script_test',...
-1
votes
2
answers
288
views
supervising daemons in debian
We are running rabbitmq, redis and celery on a Debian wheezy (oldstable) linux server. all of them are installed as init.d scripts and started at boot time. we would like to keep an eye on them and ...
2
votes
1
answer
751
views
do I need to restart ALL the hadoop daemons whenever I make changes to xml configuration files
Suppose my hadoop cluster is running and I make changes to hdfs-site.xml.
My question is which services/Daemons need to be restarted in this case?
Similarly which daemons need to be restarted if I ...
5
votes
0
answers
3k
views
heartbeat timeout error running rabbitmq
Running a Rails App in Mac. I start rabbit mq server in other terminal tab:
$ rabbitmq-server
The I do staff within my Web App, and when the mail is supossed to be sent, I got this in /usr/local/...
1
vote
1
answer
1k
views
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, ...
1
vote
2
answers
311
views
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 ...
1
vote
0
answers
80
views
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 ...
1
vote
2
answers
558
views
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;
...
0
votes
0
answers
62
views
MacOSX lanch daemons
I am creating a virtual folder in my system which is needed to be persisted until the user manually removes it. Since it is a virtual folder it is getting removed automatically once the system is ...
1
vote
0
answers
245
views
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 ...
4
votes
0
answers
5k
views
Unable to run a systemd service daemon on Ubuntu (how to switch to Upstart or is there an updated distro)
Note: I don't have any real experience managing servers or using Linux on any deep level so my knowledge and understanding is quite limited. In essence, I'm winging it.
For full code examples see: ...
2
votes
2
answers
1k
views
Ticker and Daemon on Golang
Is it possible to use Ticker to implemented the graceful termination of a long running daemon process? I read the other related thread on here that you should always close the channel to avoid memory ...
0
votes
1
answer
29
views
Not able to run Hadoop daemons
When I run the jps command:
I only see jps as the running java program in return.
When I run start-all.sh command, I receive errrors like:Connection to port 22 refused
9
votes
1
answer
2k
views
Correct daemon behaviour (from PEP 3143) explained
I have some tasks [for my RPi] in Python that involve a lot of sleeping: do something that takes a second or two or three, then go wait for several minutes or hours.
I want to pass control back to ...
0
votes
2
answers
999
views
Passing arguments from sh script(remade from etc/init.d/skeleton) to python
I have a script and I need him to pass arguments to python program. I take arguments:
DAEMON_ARGS=""
start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --startas $DAEMON \
...
12
votes
1
answer
47k
views
How can I create .sh extension file in Linux Ubuntu? [closed]
I'm trying to write a script to run one of my .jar files as daemons, but I am not understanding how to create a .sh extension file in Ubuntu. I have already used vi to create a file with the code that ...
85
votes
5
answers
214k
views
Run bash script as daemon
I have a script, which runs my PHP script each X times:
#!/bin/bash
while true; do
/usr/bin/php -f ./my-script.php
echo "Waiting..."
sleep 3
done
How can I start it as daemon?
0
votes
0
answers
667
views
Signal and waitpid coexistence
I have the following question: can I use a signal handler for SIGCHLD and at specific places use waitpid(3) instead?
Here is my scenario: I start a daemon process that listens on a socket (at this ...
0
votes
3
answers
7k
views
Data-Node Does Not Start
I have trouble starting my Hadoop data-node. I did all the research that I could and none of the methods were helpful in solving my issue. Here's my terminal console output when I try to start it ...
0
votes
1
answer
53
views
Hadoop: Cannot Launch Daemons
I am having trouble launching daemons in my pseduo-distributed hadoop configuration. I type in the following command:
sudo bin/start-all.sh
I get prompts to enter my password, but once I do that, I ...