The tag has no wiki summary.

learn more… | top users | synonyms

11
votes
4answers
9k views

How do I mount sshfs at boot?

Using a NAS box as 24/7 file server, I'd like to use sshfs to connect to it from an Ubuntu 9.04 desktop. Currently, I have this line in the desktop's fstab: sshfs#jldugger@storage:/mnt/HD_a2/ ...
7
votes
1answer
9k views

Init script does not create a PID file

I need to create an init script for an IRC logger. I copied /etc/init.d/skeleton. I filled in the configuration section to fit my needs and I also had to add --background to the start daemon command ...
7
votes
1answer
7k views

What are the correct permissions for /etc/init.d/ scripts?

What are the correct permissions for /etc/init.d/ scripts and what chmod options sets them?
6
votes
4answers
6k views

Any way to make service do not autostart in Ubuntu/Debian, but leave K00 scripts in place?

I need to have only stop scripts in rcN.d (runlevels 0,1,6) for apache2. So that I always start it by myself, but when reboot occurs server will shut down apache2 properly. And when I change runlevel ...
6
votes
1answer
3k views

Using Upstart to Manage AutoSSH Reverse Tunnel

I'm using upstart to manage a reverse SSH tunnel via autossh. When I do a "sudo start tunnel" the connection comes up just fine; however the command is not being automatically run when the networking ...
5
votes
2answers
189 views

Is it safe to change runlevel inside a cron script?

I want to do a nightly "hotclone" of server A to server B. It's recommended that server B be running minimal daemons during this action so I want to create a "minimal" runlevel which pretty much only ...
5
votes
6answers
2k views

How to daemonize servers on Ubuntu?

I've got a couple of servers on my Ubuntu that need to be restart-proof daemonized. How can I do that with generic init first process? Should I swap to upstart or some other replacement?
4
votes
2answers
1k views

How To Shutdown Ubuntu Automatically X Minutes After Starting Up?

How would one automatically shutdown an ubuntu OS 30 minutes after it was turned on? Or 15 minutes after it was turned on? Etc? I tried creating an init.d script like so: shutdown -h +5 But my box ...
4
votes
1answer
84 views

How to review the init script output on a dedicated server?

I have rented a dedicated server, running Debian stable. Is the startup output that you would see on the screen (if you had one) stored anywhere? If not, is there a non-intrusive way to make that data ...
4
votes
3answers
811 views

chkconfig equivalent for upstart jobs on CentOS6

On RHEL6/CentOS6 what is the upstart way to: chkconfig add my-svc chkconfig my-svc on Explanation: I have written an /etc/init/xvc0.conf job. I can do start xvc0 on the CLI, but after reboot ...
3
votes
2answers
5k views

Where do they belong? “ifconfig eth0 up” & “dhclient”

I have a minimal linux installation. The problem is that in order to access the web I have to issue ifconfig eth0 up dhclient after every restart. Where is the canonical place of these commands on ...
3
votes
2answers
3k views

init script that logs output of the script

How can this be done? I know it's pretty simple and includes appending something like & or &> to the actual command that starts the init script. But, what is the best approach and how can ...
3
votes
3answers
227 views

Process monitoring services

I'm looking into different services that help keep processes up and running (auto-restart in the event of a crash). Which ones do you prefer and what are your commends/suggestions? Here are a few ...
3
votes
3answers
796 views

CentOS: Init scripts failing to start for some unknown reason

I'm running CentOS 6.2 - I've just migrated some applications over to a failover server, and copied their init scripts into /etc/init.d. I've made them executable, added them to chkconfig, with ...
3
votes
2answers
139 views

Is it possible to set an Upstart service to stop $LAST

I'm wanting the rsyslog service to run until the last moment to ensure we receive as much logging as possible on our central logging servers. On Ubuntu 11.04, rsyslog's stop line is set to "stop on ...
3
votes
2answers
383 views

how to spawn php-cgi automatically when it exits?

I am using php-cgi on ubuntu(with nginx), and the command to start it is: spawn-fcgi -a 127.0.0.1 -p 9100 -f /usr/bin/php-cgi -P /var/run/fastcgi-php.pid but sometimes the php-cgi process will exit ...
2
votes
3answers
1k views

Init.d vs Cron - which to use?

I'm writing a silly little script to email people when a (Debian Lenny) server boots. Right now I've set it up as an init.d script using update-rc.d, but then I realized I could have just used cron ...
2
votes
2answers
118 views

Is it acceptable to use `grep` to check for the presence of a string in a file within an init script?

Is it okay for me to check the contents of a file for a given string with grep in an init script? I am concerned about introducing dependencies and general convention when it comes init scripts, and ...
2
votes
2answers
674 views

Explanation of the init.d/scripts Fedora

Below is a copy of vsftpd, i need some explanations of some of the scripts mentioned below in this script: #!/bin/bash # ### BEGIN INIT INFO # Provides: vsftpd # Required-Start: $local_fs $network ...
2
votes
2answers
398 views

Monitor a custom Java HTTP server from a bash shell?

How could I monitor a service port from a bash shell? I want to monitor a Java service (once per minute on port 9090) and then call "/etc/init.d/myservice -restart" if the service isn't responding ...
2
votes
5answers
931 views

Managing per-user rc.d init scripts

I want to delegate SysV init scripts to each user. Like the SysV init, each item in ${HOME}/rc.d starting with S will be launched on server start-up with the start argument. The same for the server ...
2
votes
3answers
1k views

Ubuntu Server: Running processes at boot time

How do I make Ubuntu Servers run services at boot time, in a specific order? I have read a bit about Upstart, init.d and inittab, and I'm not sure what's the right approach for doing it. Thanks, ...
2
votes
2answers
1k views

Running sudo commands in cloud-init script

I'm developing an automatic bootstrapper for some servers as we are using Amazon EC2 for our infrastructure. What I do is: run a Fabric script which connects to EC2 and initializes a new instance, ...
2
votes
1answer
335 views

My init.d script is never called with the stop parameter?

I created a script called blueBoxT for starting and stopping Oracle and placed it in the /etc/init.d directory. #!/bin/bash echo "blueBoxT $1 - `date '+%Y%m%d%H%M'`" >> /root/blueBoxT.log case ...
2
votes
4answers
22k views

Ubuntu - dhcp server 'not configured to listen on any interfaces'

I'm at my wits end on this one; I have tried for hours to get this to work, but I'm stumped. Hope one of you can help. :-) I'm trying to get dhcp3-server to work on Ubuntu. It's installed, and ...
2
votes
1answer
607 views

How to install init-checkconf for upstart?

Upstart is installed, but init-checkconf is not. Any ideas how to get both? $ sudo init-checkconf sudo: init-checkconf: command not found $ sudo dpkg --get-selections | grep upstart upstart ...
2
votes
1answer
119 views

Fedora init boot sequence

I am interested in Linux Fedora's boot sequence, specifically starting at the user-space init sequence. What are the good sources of information on this front?
2
votes
4answers
909 views

Need help with custom init script

I'm trying to set up an init script for a process on redhat linux: #!/bin/sh # # Startup script for Conquest # # chkconfig: 345 85 15 - start or stop process definition within the boot process # ...
2
votes
2answers
489 views

Explain steps RedHat distros take to boot into Emergency mode?

Please, I am not looking for a rehash of what's stated in RedHat's documentation regarding emergency mode. I would like to know what steps are involved from the time grub hands off to the kernel to ...
2
votes
1answer
507 views

systemd to wait for command to complete before restart/shutdown or killing other processes

When I'm initiating "reboot" or "poweroff", systemd is killing all the processes, but I need it to wait for one particular application to finish before stopping other services. Actually, I want ...
2
votes
1answer
135 views

Upstart and pre/post scripts

I run into an issue with upstart where I want to update an init config, but just restarting the job doesn't apply the changes. For example: I've got job xyz running I modify the /etc/init/xyz.conf ...
2
votes
1answer
406 views

Rebuilding /etc/rc?.d/ links

A regular filesystem check on a Debian Lenny system triggered an fsck, and that nuked a handful of links in the /etc/rc?.d hierarchy (unfortunately I didn't keep a list). The system seems to boot and ...
1
vote
3answers
12k views

Solaris: reboot vs init to get to single-user mode

I have inherited instructions that say to get to single-user mode on Solaris like: Execute reboot -- -s Mount all file systems My question is, why not just do: init 1 What's the difference?
1
vote
2answers
782 views

Oneiric's init (upstart) taking up 99% cpu on openvz

I'm having a problem with a openvz vps which came with Ubuntu Natty (11.04) and I recently upgraded to Oneiric (11.10). After a reboot I found the init process stuck at ~99% cpu and the loadavg ...
1
vote
4answers
320 views

How can I find out what is causing init(8) to launch a process?

I installed Google Desktop for Linux and want to prevent it from running without necessarily deleting all its files. I managed to find and disable the file in /etc/cron.hourly, but gdl_box is still ...
1
vote
1answer
115 views

How to supply custom init script to Azure instance

Is it possible to create an instance specific init script and pass it to a virtual machine that is created via the API of Microsoft Azure? I know this from AWS, but could not find a way to do this on ...
1
vote
2answers
13k views

How to list services/daemons started at boot _and_ check their loading order

I want to be sure in what order services are started during boot process in Debian based systems (Debian Squeeze in particular). Thanks in advance.
1
vote
1answer
719 views

Ubuntu upstart script for tracd hangs on start/stop

I'm trying to set up an Ubuntu (12.04 LTS) upstart script to manage Trac's built in web server as an upstream server for nginx. Here is my init script /etc/init/tracd.conf. I used ...
1
vote
3answers
1k views

open-iscsi does not login into targets on boot

We have a Debian Lenny server with open-iscsi that's configured to log into a target automatically: hostname:~# grep \\.startup /etc/iscsi/iscsid.conf node.startup = automatic hostname:~# grep ...
1
vote
2answers
539 views

init.d not executing stop command on reboot

I have an init.d script to start a Python script: #!/bin/sh # ############################################################################### # sd-agent # # Written by Boxed Ice ...
1
vote
1answer
94 views

Waiting for devices to come up on Debian boot

I'm running OpenVPN and dnsmasmq on my wheezy system. Dnsmasq is only necessary for VPN and local users, so I don't want it to listen on all devices (yes, there is also a firewall, anyways). When ...
1
vote
1answer
251 views

(Debian) Init script auto respawn? [closed]

I created a service script in /etc/init.d (Debian) that is working - I can start/stop/status/restart. But it is not respawning. Is it possible to respawn? Thanks in advance
1
vote
1answer
725 views

Upstart: defining service dependencies / priorities

I am working on an app which runs several services / daemons using upstart. These should start on system startup, but only after the DB server (in our case mongo) was started. I am looking for the ...
1
vote
1answer
548 views

How do you stop PostgreSQL from starting a cluster under linux (Ubuntu)

I need to re-build a cluster due to some incorrect parameters set when it was first created. In particular every database in the cluster is set to LC_COLLATE of en_GB.UTF8 and needs to be changed to ...
1
vote
3answers
9k views

/etc/inittab respawn script migrating from RHEL/CentOS 5.x to 6.x

I have a non-forking perl script running as a TCP-sockets daemon (this script is a backend for a multiplayer game) in CentOS 5.7. It is being started and respawned by /etc/inittab: ...
1
vote
2answers
1k views

How can I make sure an init.d-script runs after network-interfaces received their addresses over DHCP?

I just installed couchdb on a debian5 system and added symlinks to the /etc/init.d/couchdb-script. Unfortunately, this script gets triggered on startup before the network interface received the ...
1
vote
1answer
104 views

Server won't boot, kernel panic - not syncing

After a reboot of a CentOS 6.2 server we are getting a kernel panic with the following error: Kernel panic - not syncing: Attempted to kill init! Panic occurred, switching back to text console ...
1
vote
1answer
18 views

(initscripts) Execute a command, if the command does not complete in 10 seconds, run another

On (Debian) Linux I want to: Execute a command. If the command doesn't complete in 10 seconds, kill it and try another command. The use-case is: I have a daemon service which I would like to shut ...
1
vote
2answers
1k views

runit - unable to open supervise/ok: file does not exist

I'm trying to figure out why runit will not boot or give me the status for the managed applications. Running on Ubuntu 12.04. I created /service, /etc/sv/myapp (with a run script, a config file, a ...
1
vote
0answers
49 views

Ubuntu: An init script that requires mysql

We have built some software that connects to MySQL and should be started on an Ubuntu server at boot. What we're missing is how to ensure it starts at boot after MySQL. Our init script includes the ...