The tag has no usage guidance.

learn more… | top users | synonyms

17
votes
4answers
68k views

How can I run a command after boot?

I would like to run the simple shell command echo 1 > /proc/sys/kernel/sysrq at each boot, to enable the sysrq keys. When in boot should this be done, and where should I put a script to do it?
9
votes
3answers
20k views

What are the desktop.ini files for?

My desktop has two hidden .ini files: desktop.ini (370 bytes): [.ShellClassInfo] LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21799 [LocalizedFileNames] Microsoft Office - 60 Day ...
8
votes
2answers
10k views

How do I debug an upstart job?

I have the following job in /etc/init/collector: start on runlevel [2345] stop on runlevel [!2345] expect daemon exec /usr/bin/twistd -y /path/to/my/tac/file When I start the job with sudo ...
7
votes
2answers
9k views

How do I prevent Apache service from auto-starting on Linux?

My problem is that I don't want to stop the apache daemon with the command ./apache2 stop from /etc/init.d (I know to do this). I don't want the apache service start automatically in /etc/init.d on ...
7
votes
4answers
12k views

Linux services: is there a GUI for services?

I am looking for a GUI program, that shows running services from /etc/init.d (and /etc/init), and allows to manage (start / stop / runlevel) them. What can you recommend? Background: even though I ...
6
votes
2answers
1k views

Controlling Upstart job as unprivileged user

What's the best way to allow an unprivileged user to control an upstart job? By controlling an upstart job I mean starting/stopping/reloading/restarting it: start myservice I can imagine one way ...
5
votes
1answer
4k views

Where in CentOS does program start at boot if it's not in init.d?

I have installed a software (GitLab) on CentOS. It works well, but this GitLab starts at boot and I don't want that. So I took a look at /etc/init.d in order to disable it with chkconfig, but my ...
5
votes
1answer
3k views

Where can I config service startup options in Ubuntu?

I'm not used to using Ubuntu or Debian as a server. I'm more accustomed to Red Hat/Fedora ways and even Gentoo (yikes). Under Red Hat installs, you can often configure most services that start from ...
5
votes
2answers
2k views

How to debug old initd script under systemd?

I have an older initd script to start my application. It worked fine under older versions of SuSE, but fails on Open SuSE 12.3. The strange thing is cd /etc/init.d ; ./script start works fine. ...
4
votes
3answers
6k views

LANG=C is in a number of the /etc/init.d/* scripts. What does LANG=C do and why do you need to set LANG=C.

Its not clear what it does or what it contains. I tried greping the out put of set and env to see what C or LANG are set to in other places on the systems. Nothing was clear about how it is used or ...
4
votes
2answers
4k views

Why do scripts beginning with an 'S' exist in /etc/rc.d/rc{0,6}.d?

Why do scripts beginning with an 'S' exist in /etc/rc.d/rc{0,6}.d? Will there be trouble if I change the 'S' to a 'K'? Is the behavior of the system changed when it halts/reboots?
4
votes
4answers
4k views

Init scripts per user

There is a script (more like a command) which I would like to be executed on a per user-login basis. I've heard of init.d scripts but those require root permissions and are not per-user customizable ...
4
votes
1answer
1k views

Minimize boot time on headless ubuntu

I am trying to remove as much processes as possible to minimize the boot time on a beaglebone running ubuntu minimal. So i want to remove udev-fallback-graphics and all plymouth processes. I tried ...
3
votes
4answers
8k views

how do i run a script 5mn after startup?

I have severals RoR websites running on my webserver and I need to run a ruby script at startup. So, I puted a bash script in /etc/init.d witch call a ruby process. Unfortunatly that ruby process ...
3
votes
3answers
4k views

Ubuntu, control the init startup

Ubuntu uses upstart instead of sysvinit. However there are still runlevels and the links in them. I have installed tor and it has added itself to the startup of the OS. Now I want to remove it and ...
3
votes
2answers
2k views

At what point are cgroups initialized for systemd?

So to cut a long story short, I am trying to get systemd working with an Arch install, but without running systemd from init. This means I am booting into a system that is not running systemd, then ...
3
votes
2answers
99 views

Delaying assignment of IP-address until network adapter device is available

I'm working on a custom embedded board with three Ethernet interfaces: eth0 and eth1 are built-in to the CPU (a TI AM3356) eth2 is made with an on-board LAN9512 chip (using the smsc95xx driver), ...
3
votes
1answer
1k views

How to debug old init.d script under systemd?

I can't get any output from the script. systemd just prints: sinopia.service: control process exited, code=exited status=203 Failed to start LSB: starts the sinopia web server. I can't even launch ...
3
votes
2answers
750 views

Why will dmesg have message from user space?

you can use dmesg -u to see log from userspace. In my case, I have log from systemd and lvm. Why is this happening, why userspace program can print to kernel buffer ring?
3
votes
2answers
2k views

Automatic script launch after booting on Debian

I try to launch some scripts at boot time on my Raspberry Pi (running Raspbian Wheezy). I have created the file /etc/init.d/datalogger-serveur : #! /bin/sh ### BEGIN INIT INFO # Provides: ...
2
votes
3answers
30k views

Kill xserver from command line (init 3/5 does not work)

I'm running Linux Mint 10, although I've had this same issue with other variants of Linux. I've been told/found while researching that if the X server hangs or otherwise errors, one can drop to a root ...
2
votes
1answer
72 views

Getting directory of file

I have found an error in monit init script that I want to fix on my own for now. The faulty code is PID_DIR=$(/bin/basename "$MONIT_PID_FILE") /bin/mkdir -p -m0700 "$PID_DIR" The developer wants to ...
2
votes
1answer
3k views

Files in /etc/init - are all files executed or just the ones with conf extension?

I have some files in /etc/init that I am still testing. As far as I know all files in this directory are executed on boot. My question is: does it apply to every *.conf file or to all of the files in ...
2
votes
0answers
48 views

What should happen next on init scripts?

I've been using a Linux Mint 13 live system on my memory stick and I decided to put it on my hard drive. It already had several scripts to uninstall software and optimize it, scripts that I had to ...
2
votes
0answers
544 views

/sbin/init exists but couldn't execute it

I'm building Linux from scratch. Currently I have the kernel, glibc and sysvinit. I've compiled everything myself following these instructions. Though my version of glibc is 2.19. Also, I use grub ...
2
votes
0answers
438 views

Making sysvinit load EVERYTHING in parallel - why does this even work?

I edited /etc/init.d/rc on my Debian machine and changed startup boot to startup boot &. Boot time decreases ridiculously, and no race conditions happen at all. Way faster than even Systemd (which ...
2
votes
0answers
976 views

/etc/init.d/lvm2 script not executed during startup

On startup, I want the /etc/init.d/lvm2 script shipped with Debian squeeze to be executed. I ran update-rc.d lvm2 enable and checked that the symlinks are created in the /etc/rcX.d folders: # find ...
2
votes
0answers
1k views

LVM volume activation before fstab mounts

I am trying to mount LVM volumes during startup of my Debian Squeeze system. Since for some reason, the LVM volumes / groups are inactive by default, they need to be activated before any mounting can ...
2
votes
0answers
70 views

What is the `/etc/hostname` used/required for?

I found in the /etc/hostname my IP-address, than I deleted it and each time I use sudo - I get a message and a system email sudo: unable to resolve host (none) or if in the /etc/hostname is saved ...
1
vote
4answers
3k views

Where and how are custom startup commands configured in Linux?

I'd like to add custom startup commands (for example starting a process, registering to a registration server, downloading a configuration file) to the Linux startup process. Those commands should be ...
1
vote
1answer
5k views

start-stop-daemon works at command line but doesn't work in /etc/init.d script

I'm trying to get a starter script (for a ruby gem called ar_sendmail) working in /etc/init.d/ar_sendmail: #! /bin/sh echo "in /etc/init.d/ar_sendmail" DIR=/home/max/work/e_learning_resource/trunk ...
1
vote
1answer
3k views

Unable to change IP address for eth0 without restart in Ubuntu

I have Ubuntu 12.04.1 installed. I tried to change the IP address of the interface eth0 in /etc/network/interfaces from 192.168.1.3 to 192.168.1.4 auto lo iface lo inet loopback pre-up ...
1
vote
1answer
210 views

how to know if I am using systemd on my linux?

How could I know if my linux starts with systemd or whatever package?
1
vote
1answer
213 views

LSB init service dependency

I have added the two services A and B. B is dependent on A, meaning that if I will start B then A should be start automatically if it is not running already. But A is not coming up automatically when ...
1
vote
1answer
98 views

Issues with init script services - Ubuntu 12.10

During boot, I get a series of messages like modem-manager: ... modem-manager: ... . . . I tried disabling this feature with sudo update-rc.d -f remove modem-manager remove EDIT: The output I ...
1
vote
1answer
4k views

init.d script for OpenOffice / LibreOffice headless does not stop process

I am using Ubuntu and found this init.d script for LibreOffice headless. Problem is that it does not seem to be stopping the process when asked to "stop". Any help greatly appreciated. Two other ...
1
vote
1answer
309 views

What does “switching runlevel” mean exactly?

What happens when I issue sudo telinit n (n being the new runlevel)? Does init scans /etc/inittab and does exactly the same when system is booted? For example, if I have rm:2345:wait:/etc/rc.multi ...
1
vote
1answer
69 views

Slackware init rd_local problem

I have made an error in the rd_local file which, Linux is having problem starting up because of this. Is there any way I can edit this file without starting up or am I screwed?
1
vote
2answers
427 views

How to execute a command under Linux after booting without a TTY session?

I'm creating a kiosk PC at the moment and I'm wondering if this is possible: When the PC is started and Linux Debian boots and I wonder if it's possible to start the command startx respectively xinit ...
1
vote
1answer
238 views

When does crontab starts?

I'm having lots of problems with my Ubuntu 10.04 in AWS and init scripts. I have my rc.local with some mounts, mkdirs & more but they don't do everything as expected, just a few of them and not ...
1
vote
1answer
579 views

Making upstart job redirect output as unprivileged user

I am currently making an upstart job run as an unprivileged user like so: start on started mongodb stop on runlevel [06] respawn respawn limit 10 100 env NODE_ENV=production pre-start script ...
1
vote
0answers
9 views

Init script changes for MongoDB

We have MongoDB(version 3.0) in production in standalone as well as in cluster mode. Currently we were facing issue saying "unclean shutdown detected hence unable to start mongod". 1. After debugging ...
1
vote
1answer
74 views

Change ubuntu defaul runlevel

i need change default runlevel to ubuntu server 14.04. I installed GUI to manage the hp printers and now i need return to runlevel 3, i edit the file /etc/init/rc-sysinit.conf and modify the line: ...
1
vote
1answer
183 views

This arch install not yet working, /sbin/init trouble

I do an lvm2 arch install, as the installation page on the wiki tells. I do what the wiki page tells, with the mileage: put Grub as boot manager. Set the lvm2 hook on the mkinitcpio configuration. ...
1
vote
0answers
168 views

Can I use /etc/init/ on Debian Wheezy to manage a daemon process?

I want to run a PHP daemon process and found a solution at Stackoverflow but unfortunately its not working. Now I thought Upstart is not installed since Debian still uses System V. I have two ...
1
vote
2answers
92 views

What causes import command to fail as running through a service

Our System V service runs a daemon that runs the import command. Running our service by sudo service myservice start seems to start the service but when it comes to take a screenshot, import does not ...
1
vote
2answers
452 views

How to investigate runlevel initialization?

I'm investigating why a service (solr) is not started upon server booting (in this case a vagrant box, running ubuntu 12.04). The script is running if i run /etc/init.d/solr start I run sudo ...
1
vote
0answers
906 views

Automatically mounting an encrypted USB disk at boot

I've followed these steps to set up an encrypted USB hard disk on Lubuntu 13.10, and these to unlock it with a keyfile instead of a passphrase. I now have a disk ...
1
vote
1answer
3k views

Does Linux Mint use upstart or update-rc.d to manage init scripts?

In Linux Mint 15 the /etc/init.d/README is copied from Debian and says to use update-rc.d to manage scripts. However, all the script comment headers reference Upstart throughout. Does it make a ...
1
vote
2answers
1k views

How to disable CTRL-C during init process?

I have set up a kiosk system with Linux Debian Wheezy. After booting a user gets logged in automatically, executing startx through /etc/inittab. Problem is that people could shutdown the machine or ...