Tag Info

Hot answers tagged

12

Have you tried: launchctl list launchctl stop label


9

You don't need anything special to make a daemon, really. Any program in any language can "daemonize" itself. Alternatively, you can daemonize an existing program with a small shell script wrapper (for instance the /etc/init.d program launcher can take care of it). Typically, a daemon has the following properties : working directory must be / STDIN must ...


8

In most linux distributions you can manually start/stop services by (as root or using sudo) running the following commands: # /etc/init.d/apache2 start # /etc/init.d/mysqld start # /etc/init.d/apache2 stop # /etc/init.d/mysqld stop Which services that are automatically started is controlled by file links in /etc/rc[runlevel].d/ . Find your current ...


8

Square brackets are used for processes that do not have an associated command line (mostly kernel threads and some system services). If I recall correctly, you might be able to achieve the same effect for your process by setting argv[0] to the empty string.


8

Two things: You should always check return values from system and library functions. If you had if(remove(dirp->d_name)<0) perror(dirp->d_name); else files_deleted++; then you'd see what was happening. The reason your code doesn't work is because remove() and unlink() require the full path to the file in question, whereas readdir() ...


5

Ubuntu 10.04 is in the middle of a transition between two service management systems: SysVinit (the traditional system, used by most Linux distributions) and Upstart (a newer system pushed by Ubuntu and becoming available in more and more distributions). SysVinit service management scripts are in /etc/init.d. You can start the service with ...


4

For pure daemon usage on a headless server, rtorrent would be the client I would go to. It's command-line and very feature complete, although it's not the easiest thing to set up being purely command line. There are numerous web interfaces to rtorrent as well, although, again, they don't seem to be very easy to set up. For GUI clients, I prefer ...


4

iptables is a poor example as it's not really a service or daemon that is running, but part of the kernel. You can't really "stop" iptables, you can only give it a configuration and "stopping" it involves giving it a blank configuration. Indeed I have had Linux systems crash, but the port forwarding setup using iptables continues to work. Anyway, a ...


4

The monit answer above is valid, but I thought I'd mention some alternatives: Supervisor daemontools daemontools-encore runit Upstart systemd sysvinit s6 perp nosh It's worth bearing in mind that your operating system has already solved the process management problem. Traditionally, Linux has used sysvinit, which is basically the collection of scripts ...


4

I had the same problem using CentOS 6 with supervisor 2. I will assume you run a similar configuration. In my case, upgrading solved the problem. However, there are no available up to date supervisord binary package for my system. So here is how I have updated: First, download the following source RPM supervisor-3.0-0.5.a10.fc16.src.rpm (available here: ...


4

Buildroot has three possible init systems, so there are three ways to do this: BusyBox init With this, one adds an entry to /etc/inittab. ::respawn:/bin/myprocess Note that BusyBox init has an idiosyncratic /etc/inittab format. The second field is meaningless, and the first field is not an ID but a device basename. Linux "System V" init Again, one ...


4

After you put plist in /Library/LaunchDaemons you need to run command sudo launchctl load -w /Library/LaunchDaemons/your.plist See man launchctl for the -w flag (it does exactly what you need) Edit: did you set the RunAtLoad key to true in your plist? Edit2: I forgot, RunAtLoad has no influence on autolaunch, it is all bout Disabled key.


3

Use the netstat tool. For example: netstat -pan Look under the section that says "LISTEN" and it will tell you what ports the daemons are listening on. Note that you should run this as root unless the daemon is running as the user you're logged in as.


3

The easiest way would be to add it to /etc/inittab, which is designed to do this sort of thing: respawn If the process does not exist, start the process. Do not wait for its termination (continue scanning the /etc/inittab file). Restart the process when it dies. If the process exists, do nothing and continue scanning the /etc/inittab file. For ...


3

You wanna use Deluge. It's awesome. From the About Deluge page: Core/UI split allowing Deluge to run as a daemon Connect remotely to the Deluge daemon Web UI Console UI GTK+ UI BitTorrent Protocol Encryption Mainline DHT Local Peer Discovery (aka LSD) FAST protocol extension ĀµTorrent Peer Exchange UPnP and NAT-PMP Proxy support Web seed Private Torrents ...


3

Allmost all GNU/Linux torrents have daemons these days. I personally use Transmission, but you can also use Deluge, uTorrent and many others.


3

To start a script in non-interacting session, use nohup (it will detach your process in a standalone term). To make your script executable, use chmod ugoa+x <script_name>. The last point, do not use #!/bin/bash or #!/bin/sh because you don't know if resides in /bin; try using #!/usr/bin/env bash (or sh) which forces the process to work under bash ...


2

If you are trying to daemonize a program that doesn't have a daemon mode then you can use daemonize. There are RPM packages for it in the repoforge repository.


2

You don't mention what OS you are running so I'm going to assume it is a Windows variant from 2000 or later. All recent Windows variants have a task scheduler and the "windows scripting host" through which you can run scripts written in vbscript or jscript, so a simple way to do what you are looking for without installing extra software is: create a text ...


2

In fact there is a way to auto-chown files created in a certain directory. Let's say the files you want lighttpd to be able to access are in /var/www. Then you set the group of /var/www to your group and set the SGID bit on /var/www. You will probably want to do this recursively for subdirs. I'm assuming the group is www-data. chgrp -R www-data /var/www ...


2

I use Rainlendar. Lite version is freeware and contains the functionality you need. While the reminder doesn't blink it will pop on top of other windows and you get a sound alarm with it. You can set one time events or recurring events. You can also select what sound you want to play for the reminder.


2

I would recommend running something like this in a screen session instead. The benefit of screen is that you can reattach to the console whenever you like to run a command, then send it to the background again as needed. First type screen to start a session. Run your minecraft server as you would in standalone mode. Press Ctrla Ctrld. You can now close ...


2

In most clients you can type '/quote version' or just '/version' and it will query the server, which by default on most IRCds will respond with the info, like: -> Odd server stuff: "351 InspIRCd-1.2 hub.yourdomain.com :FreeBSD hub.yourdomain.com 6 .2-RELEASE (InspIRCd-1.2.1) [FLAGS=0,kqueue,196]" (hub.yourdomain.com) 005 WALLCHOPS WALLVOICES MODES=19 ...


2

Your example doesn't even show the [...], so I'm not 100% sure what you're talking about. However it IS possible to modify the argv arguments of any program (in Linux). The arguments are reflected in the output of ps.


2

Since a daemon is a program that is a background process (that is, a process that doesn't involve any interaction on your part in doing what it does), and persists until the process is killed (lets say via an init script you wrote for this very thing), then yes. If you daemonize uWGSI, it will run until you kill the process spawned by the daemon. You might ...


2

Running pulseaudio -v in a terminal (run pulseaudio -k first if it complains about already being started, but since you say it doesn't work, it most probably is not running. Prefix sudo if it complains about permissions) should get you more detailed output on why PulseAudio won't start, which will enable you to find more specific info in your case. If ...


2

Source the environment in your startup script if mugen kenichi's solution is not an option. I have some startup scripts that use mugen's approach and others that source the environment directly in the script. It's often simply a matter of preference. Sourcing the environment directly in the startup script is more transparent to other users who might edit the ...


2

Normally, no. When re-installing MySQL the existing databases are usually not removed. That's why you may see notes to drop the databases before you uninstall, if you go that way. However, if you're still unsure, create a backup copy of the contents of the data folder, which will contain all your databases. You'll see a lot of .frm files inside. Then after ...



Only top voted, non community-wiki answers of a minimum length are eligible