Questions tagged [init]
117 questions
81
votes
7 answers
Best way to disable swap in Linux
I am running a custom compiled 3.18.9 kernel and I am wondering about the best way to disable swap on the system. I also use init if it makes a difference.
Is it enough to comment or remove the swap line in /etc/fstab to prevent swap from…
user283167
- 813
- 1
- 7
- 7
35
votes
6 answers
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).
user155872
- 353
- 1
- 3
- 4
22
votes
3 answers
How to use the `$HOME` environment variable in systemd service files
I am trying to use the $HOME environment variable in the ExecStart. I tried many different things like $HOME and ${HOME} but nothing seems to be working
ExecStart=${HOME}/bin/some-binary
Anyone knows the correct format for this?
Keeto
- 351
- 1
- 2
- 5
16
votes
5 answers
Standard or best way to keep alive process started by init.d
I'm looking for a standard way or best practice to keep a daemon started by an init.d shell script alive.
Or even better, is there a way to keep it alive directly from /etc/init.d?
Specifically, I have a daemon called dtnd with and infinite loop…
Adrian Antunez
- 473
- 1
- 5
- 10
16
votes
1 answer
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?
davidmytton
- 666
- 3
- 7
- 17
12
votes
5 answers
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/ /mnt/storage fuse …
jldugger
- 14,122
- 19
- 73
- 129
10
votes
2 answers
Permanently Disable Init Service
I just provisioned a new VPS running CentOS 6, and it comes with Apache.
I want to disable Apache, because I will be using Nginx instead.
I know I can just delete the script in /etc/init.d/, but I don't want to do that, because it's a stock thing…
Max Bucknell
- 213
- 1
- 3
- 9
10
votes
5 answers
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 log folder and a run script inside of it). I create…
Alexandr Kurilin
- 546
- 1
- 8
- 20
10
votes
1 answer
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 services are started, and no matter what I change…
Nuri Hodges
- 381
- 3
- 12
10
votes
1 answer
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 since my IRC logger doesn't split off. The logger…
Cory Walker
- 236
- 2
- 4
- 11
7
votes
1 answer
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 C.
I'm comfortable with backup up the cluster…
Philip Couling
- 1,535
- 1
- 17
- 32
7
votes
4 answers
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 2-3 server doesnt' touch apache daemon (leaving…
Evgenyt
- 733
- 1
- 7
- 10
6
votes
8 answers
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 setup correctly to run in rc2,3,4,5.d runlevels. On…
Jez
- 1,333
- 2
- 11
- 23
6
votes
2 answers
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 does not shut down after 5 minutes.
darkAsPitch
- 1,861
- 4
- 25
- 42
5
votes
4 answers
Will "init 1" from a remote (via VPN) ssh session kill my ssh connection
Title says it all. but here is the scenario:
Connected to work via VPN
on a Linux client
ssh root@server.company.com
init 1
Will going down to "single user mode" via "init 1" kill and disconnect my root ssh session?
Heston Holtmann
- 163
- 1
- 6