Fedora Servers :: Run A Shell Script As A Servive/daemon?
Jul 7, 2010
I have a script as report.sh which prints its out put in some file.Now I want to run this as a service so that when I start this service it shud run in the background and give me the out put.Again I should be able to stop it and I should able to configure its so that it can start when I start my system.What I have doneIn the /etc/servicesI have added report 5555/tcphen in the /etc/xinetd.d I have created a file report_com where I have given
I just got the problem while starting the dhcp daemon. Its showing failed. I need to start it for my clients to be autoinstalled. I am having CentOS 5.2 linux. I've installed all optional packages also while installing CentOS. How to start the dhcp daemon? I've tried the /etc/init.d/dhcpd start also. But it didnt work. Showing Failed.
I am not able to start mysql server...when i type command sevice mysqld start it saysMySQL Daemon failed to start.Starting mysqld: [FAILED]so how to solve this problem ?
Am not sure of the best way to go about writing a script. All I need at the moment is to start a java http server program at startup.How should I write languagetool.sh so as to be able to stop the script execution?
I have a test server on which I'd like to run up to 30 separate instances of a program as daemons, each running on a different IP address bound to the server. I've created a init script that takes an additional command line parameter - the last octet of the IP address. For example:
Code:
sudo myprog 40 start sudo myprog 41 start
This would run instances of the program on IP addresses 192.168.1.40 and 192.168.1.41 respectively. But it's looking like this approach isn't doable if I wish to have any or all of these run at startup, as the links in the rcN.d directories can only link to the init script, not pass a parameter.
I have installed transmission on a headless server. I am using transmission-daemon and connects to the webclient on the LAN. However from WAN I can't connect. I have forwarded port 9091 in my router and it connects with the server, but I get 403: Forbidden.
i am succesfully installed TeamSpeak 3 server and now i want to startup it automatically without screen daemon and on every startup on linux ubuntu 9.10 i am using this command for start the TS3 server:./ts3server_linux_amd64 dbplugin=ts3db_mysqlin home/user/Desktop/ts3server_linux_amd64
I installed MySQL on my Ubuntu 10.04 desktop. As I need it only once a month I removed it from all runlevels but mysql is still running after boot up. "lsof" shows that it is running and listening for connections.
I am having some trouble making the dropbox daemon start at boot. I followed these instructions -> [URL], which are basically a replica of the original instructions from the Dropbox Wiki [URL]. The installation went fine, except that the machine still cannot start the daemon at boot. I tried to modify the init.d script a bit (see the attachment), but it still wont work (I am not sure if my changes made any significant difference, though). The daemon will only start if I invoke it manually after login with the command:
Code:
[user@machine:~]$ service dropbox start
Which executes the daemon just fine. I also tried adding this line of code to crontab:
Code:
@reboot /etc/init.d/dropbox start
This command starts the daemon if I check with the command "service dropbox status", but if I execute the official dropbox CLI command:
Code:
~/bin/dropbox.py status
it says that Dropbox isn't running and I still have to execute it manually.
P.s.: The machine runs Ubuntu Server 10.04, with all the latest system patches and updates.
I'm trying to run BoxBackup to sync a couple active servers to a data server. I installed the server and client, making sure to follow the instructions closely with all the certificates. The problem is the service daemon on the service won't even start. The service manage reports: "bbstored dead but pid file exists" (basically, tried to instantiate the process, but it died due to faults).
Here's the log of the daemon in /var/log/box
Code: Jul 27 13:05:10 frogbert bbstored[13429]: NOTICE: Box Backup Store Server v0.11rc8, (c) Ben Summers and contributors 2003-2010 Jul 27 13:05:10 frogbert bbstored[13433]: NOTICE: Starting daemon, version: 0.11rc8 Jul 27 13:05:10 frogbert bbstored[13433]: NOTICE: Using configuration file: /etc/boxbackup/bbstored.conf Jul 27 13:05:10 frogbert bbstored[13433]: WARNING: Exception thrown: ServerException(SocketBindError) at ../../lib/server/SocketListen.h(232)
I would like to be able to simply run a shortcut file or batch file in a windows os to start or stop my transmission-daemon.I was thinking about using putty to auto login and execute a file using the -m switch. A problem I am running into is that /etc/init.d/transmission-daemon stoprequires the use of sudo.That would require entering a password which would be automated and insecure or would require manually typing int he password.
I currently have sendmail installed. It starts as a daemon but I want to avoid doing that. I want to start it manually.Also am a dynamic host.so every time i start my computer my ip changes. I use ddclient to update my records at dyndns.com.but how to configure sendmail in the case of dynamic hosts since it looks at the file /etc/hosts which contains information about the static hosts.
I've just installed subversion.I need to create a script /etc/init.d/svnserve that will start at boot time.I want to use start-stop-daemon --start so I can track my process and eventually kill it using start-stop-daemon --stop.My problem is that I can't get it to work and the documentation shows no exemple.
I've replaced $DAEMON by the whole line: svnserve -d -R -r $REPO_ROOT and got -d is not an option.I'm not quite sure what to do at that point. If someone has some experience with start-stop-daemon it would be great.
I'm more of a CentOS person, but after some issues on my new box I switched to Ubuntu server. I am working on getting it setup as a mail server (mainly for testing at the moment and soon be live). I performed apt-get install sendmail then apt-get install exim4 and got the message:Could not perform immediate configuration on 'exim4-daemon-light'. Please see man 5 apt.conf under APT:: Immediate-Configure for details. I have Ubuntu Server 10.10 32-bit on a Dell Intel Poweredge.
I'm new to Fedora and have just purchased a subscription to a GoDaddy Virtual Dedicated Server, which I'm able to control using SSH.I have a Java application that I want to run as a daemon on this VDS. Some google searching yielded a bunch of different methods of doing this, none of which I'm sure would be guaranteed to work with Fedora, so I was hoping someone here could give it to me straight and fill me in on the simplest way of doing this.What is the best/simplest way to run a Java application as a daemon on Fedora?
I was trying to get a daemon to load on boot, I stupidly added it to rc.local and it just hangs. I would love to put in a live CD and edit out the line but the volume is encrypted and I cannot get it to mount.
Is there a way I can cancel the daemon from loading or get to the grub menu (not readily visible since I am single boot) and then boot into a console?
i installed transmission on my fedora14 VPS for headless usage by "yum install transmission transmission-daemon", problem comes when i try to configure the init.d Scrip for transmission-daemon to run as a different user instead of the pre-specified user �transmission�,how should i modify the default transmission-daemon file bellow?
I've been trying to get my internal microphone to work in F12, and as part of the things I've tried I had the seemingly bad idea of reinstalling pulseaudio. The problem now is that pulseaudio fails to start... The following is from /var/log/messages, and is repeated several times:Code:Nov 24 08:51:20 localhost pulseaudio[6300]: main.c: Daemon startup without any loaded modules, refusing to work.
I have fedora 12 32 bits installed on a Macbook pro (intel core duo) I did "yum update" this morning, I have restarted the system and got the following message:Starting abrt daemon: abrtd: Failed to start: got sig 2 FAILEDI have browsed in the web but I cannot find useful information. Then I typed:$rpm -qa | grep abrt
I'm having some problems getting my screensaver to work automatically.If I start the screensaver config program then it gives me this message: "The XScreenSaver daemon doesn't seem to be running on display ":0.0". Launch it now?" If I click yes then my screensaver works exactly as expected.How can I get the XScreenSaver daemon to start automatically?
I'm having trouble booting after a recent bunch of updates (haven't been able to boot F12 from hard disk for a couple of days). The boot process gets as far as "NetworkManager daemon [OK]", then just stops. I get this for all 3 kernels that I can choose from the grub menu (2.6.32.16-141, 2.6.32.14-127, 2.6.32.12-115)Mounting the hard drive with a liveUSB, a quick inspection of /var/log/messages reveals that things go smoothly until: etc. until I hit the power button.I ought to mention that I wireless card that requires the Realtek RTL8192SE driver, which requires
I have created a daemon which is being run as a system service at boot, and the start command goes well. When I login after boot and check with
service name status
it says it's running and the daemon accepts requests from clients in the network, only the executable it runs as a response to a client request does not work properly.
If I manually restart the service, as with service name restart everything works OK until the next system reboot.
Somehow the context in which the daemon runs is not OK after boot, and it becomes OK after manual restart.
I have a java program which I need to run as a service or daemon. What is the most stable method to do it? It will be heavy processing socket programming which will be continously receiving data?