I have tried to abstract as much of that away as possible. The options specify a pid file, to make a pid file. A subsequent line tries to establish whether the process is up, though I think several conditions are not checked for. This script seems pretty ropey to me. I am trying to start again with the lsb-base one in /etc/init.d/skeleton though that is going to require a lot of modification. get the code change to use the syslog API however that is out of the question at least for now.
1.) Create a named pipe
2.) Start up a logger daemon that reads from the named pipe
3.) start up the server process that writes to the named pipe
It would be ideal for this if start-stop-daemon offered options to specify where the IO of the daemon process should be redirected to. However I am not about to offer to adopt that package (with ~400 bugs) so I doubt that will happen. Trying to specify the redirection on the command line does not work. In the case of the logger daemon start-stop-daemon seems to hang on the system call. In the case of the server process the pipe gets closed when start-stop-daemon exits, so the logger daemon exits. None of that seems surprising.So what I am doing now is to write simple wrapper scripts for the server and logger processes. Both wrapper scripts have this structure:
1.) sanity check the arguments
2.) exec program [suitable redirection of IO]
Then the start-stop-daemon can call the wrapper scripts as daemons. From my experiments so far this seems to work. However I feel a bit uncomfortable with this. It introduces several new wrapper scripts.I cannot think of any obvious security holes but I suppose race conditions are inevitable.
Syslog stops writing immediately after log rotation, after I start the system (but not after reboot), and at some other times, into my fast cgi application's log. It starts working after /etc/init.d/sysklogd restart.
Configuration:
I am using Ubuntu 8.04 lts server, Apache web server.
I'm trying to write a init.d script to daemonise a sagemath notebook server. Here's what I've done so far, I've copied /etc/init.d/single for the structure, and tried to use dtach to provide a handle to access the process. However, my main problem is issuing the signals to kill the process (Ctrl-C) from a bash script and exit dtach (Ctrl-`)
I have installed the Apache Directory Server (ApacheDS) Now I need a iniscript that startining the App as Root, so that it can use the Port 389. After them a unprivileged User (apachds) should run the Service. The same solution I am searching for Glassfish. What can I use for them? RHEL and compatibles doesn't have a start-stop-daemon like Debian.
recently I've updated my kernel, i had to reconfigure some stuff, in particular, the b43 module is not loading at init process, my question is: what command should I use to load it from the init? or what file should I hagve to edit?
Is there any difference in cpu usage for process in init.rc(runs automatic when boot is happened) and manually running process. Will these both have same priority by default...?
I am looking for an open source syslog server which accumulate the each and every log of Windows, Solaris, Linux and network devices. Currently I am using Syslog-ng which is not fulfiling my requirement in Windows clients, as I need the logs of every action which user performed after logon.
I have tried to configure an Enemy Territory Server in an way that a common user could run it just executing a command line. The first thing I did was writing a script like that
and then putting it in the /usr/local/bin directory. Ok, the things seem to be fine, but then I realized that the program tries to write some config and log files. I noticed that because some warnings appear in the command line, like that Couldn't write etconfig.cfg always that I run the command as a normal user. On the other hand, if I give writing permission to these files, all the warnings disapear. But I don't think it is a good way, because someone could change these files by hand, what would not be good.
My last try was to set the suid of the script up, with the command chmod u+s /usr/local/bin/etded-server But as I already knew that suid does not work well with shell script I wrote a C source like that:
I have a script in /etc/rc.d/init.d named foo. I want to start/stop/restart my process as follows:$ foo start But I do not see the [OK] message once it starts. There is no shell prompt returned either. It seems that my own process is the problem. The executable that foo calls is built from this sample code:
int main() { do { printf("Hello world "); sleep(1); } while (1); }
Do I have to return some kind of signal handle for this to work?
Im trying to create a custom xsession on Ubuntu 10.04 that will launch nxclient and logout automatically when it closes.
This is what I have so far
Code:
How would I go about altering this script to logout when nxclient closes? To make this more complicated, nxclient spawns a separate process (nxssh) when it logs in and closes itself.
Is it possible for a script to listen for a child process to close and then execute some commands (in this case a logout)?
I have a project in which many processes run. p1,p2,p3.
->There are some .so files are included in some process when needed example ppp.so in process p1 (when ppp is needed and will go like a plugin) but it has a init () function how a process includes a init() function ?
->process p1 has main function i.e main()
->so evry process has main() right ?
what is the difference between init () and main () functoins. where is init () used and how many init() a process van have ?
I am working on a light version of linux for no particular reason other than to see how small I could make it. I was wondering if INIT was necessary, or if I could perform all of the INIT-related tasks (fsck, unmounting, etc) by hand/bash scripts?
I do not need multi-user functionality (Or much of anything for that matter). I started off with a Gentoo base 2.0.2 Install with kernel 2.6.38.
I have Ubuntu 10.10 installed. When I boot, this error message appeared "init: ureadahead main process 388 terminated with status 5" After that, another error message appear saying " *ERROR* render ring head not reset to zero"
Code: init: ureadahead main process (423) terminated with status 5 Ubuntu 10.10 lorentz tty1
lorentz login: The first line of the above shows up during boot before the display goes graphical. I can see it again (all of the above) when I Ctrl+Alt+F1 to access the first text console. Anyone know what is causing this, what problems can happen as a result, and what should be done about it? I moved from 9.10 on one machine to 10.10 on a new machine, so I don't know if it's a hardware problem or software. I am running 64-bit. I am not really seeing any problems happening besides the few scattered application and GUI glitches that are common with a new/migrated setup.
I keep getting this message as the first thing I see when I boot up. Afterwards, it displays the ubuntu logo and dots under it and then the screen blacks out, but the display lights act like its OK (wireless ETC). should I use a boot CD or something? The hard drive is fine and this happened after the computer blacked out during updates. i scanned the hard drive and its OK, according to the little scan thing you can do before booting up. I have a Compaq Presario V200. For specs, thats all I know.
Can't seem to get past this error Doing a google search resulted with no good answers that pertained to this issue. Not sure what's halting the system from starting up, but it just sits and hangs at this forever. Only able to view the error when booting into single user mode - normal boot hangs after "enabling /etc/fstab swaps: [OK]"
I have upgraded my ubuntu to the latest version a few days ago. Prior to the update I played a little with my partitions (transferred about 15GB from my windows partition to ubuntu partition).Up until yesterday everything worked. For some reason ubuntu will not load up now. After selecting ubuntu on grub i get the following msg: init: mountall main fsck process (574) terminated with status 3 mount of filesystem failed one or more of the mounts
i have sendmail & NIS working properly but i donot have centeralized authentication i.e. server user is not able to login from client Desktop and i donot get Global address book of users in mail client when accessing mail.
present we have a folder shared between branches (Approx 10G of data) and we're using Windows 2003 with DFS but this has had a number of issues and thus is scheduled to be replaced with a Linux solution for various reasons.I would need a scalable system that will allow me to start off with 5 servers each having a samba?hare to Windows pc's. The 5 servers though must replicate any changes made to the folder. So if server 1 received a new file, it should replicate the change to servers 2-5 etc... Ideally I would also like the shares to allow for AD based permissions.Can anyone recommend a way forward with this? I am currently looking into GlusterFS and lsyncd as two options for the replication
I am using Ubuntu 10.04 LTS. Two days ago I updated using update manager. After that I can not boot Ubuntu. When I trying to boot system showing message " Ubuntu is running in low-graphics mode Your screen, graphics card and input device settings could not be detected correctly. You will need to configure these yourself" But I can not configure it.I can not boot to 'recovery mode' also
/var/log/boot.log
Code:
fsck from util-linux-ng 2.17.2 /dev/sda6: clean, 304282/1680960 files, 2964945/6723194 blocks init: Failed to spawn ufw pre-start process: unable to execute: No such file or directory
I have an Acer 9410Z laptop that I believe is running the Maverick Meerkat version of Ubuntu Studio. I just did an upgrade using Synaptic. I get to GRUB, but When I try to boot 2.6.35-22 (or the recovery mode or a real time kernel I had installed )I get the error:
INIT: Failed to spawn ureadahead main process. No such file or directory I then get the Ubuntu Studio splash screen for 2 seconds but then instead of a normal boot I end up in the terminal.
I upgraded from Ubuntu 10.0.4 to 11.0.4 on a Dell Optiplex. Now, when I boot, I am given the option to boot into different kernels. I select "ubuntu, with Linux 2.6.38-8-generic", which results in a black screen that reads
Code:
init: plymouth main process (58) killed by SEGV signal and that's where it hangs. Pressing ENTER or hitting Esc does nothing. What steps can I take to recover my machine and all the files I used to have on it?
I Installed Bugzilla 3.2 on Centos 5.3.I have other window 2003 server (Domain Controller).But it is Windows Small Business Server 2003.i have many OU on that.I want to integrate Bugzilla 3.2 with LDAP.