4
votes
2answers
48 views

What's the recommended way to run a service as a non-root user?

I have a simple init.d script which starts and stops a process. I call the init.d as root, but I'd like the process it controls to run as a specific user. The most common suggestion online seems to ...
1
vote
1answer
105 views

hostapd will not start via “service” — but will start directly

I am having trouble getting hostapd to start as a service. It fails when I try to start it: $ sudo service hostapd start [FAIL] Starting advanced IEEE 802.11 management: hostapd failed! From what ...
1
vote
2answers
58 views

An init-script does not get called on shutdown

I have set up an init-script to control the state of a VirtualBox VM: #!/bin/sh #chkconfig: 35 99 5 #description: vTiger virtual machine ### BEGIN INIT INFO # Provides: vtigervm # Required-Start: ...
2
votes
1answer
82 views

local shutdown scripts (do's and don't's)

At work, I'm running linux, and use vagrant on a daily basis. What I find annoying is that the system often hangs when I reboot/shut down, if I forgot to vagrant halt any virtual boxes I may have ...
2
votes
1answer
239 views

chkconfig bootup script failing, script runs good manually

I recently purchased a vps and I attempted to create a startup/restart script to start up my java program. I am running CentOS 6. The script works if I execute it manually with this command: ...
0
votes
1answer
477 views

Converting update-rc.d redis_6379 defaults to chkconfig command

I'm trying to run the commmand below to Centos and of course I get command not found. How do I then convert it to chkconfig ? update-rc.d redis_6379 defaults
3
votes
1answer
4k views

How to make unix service see environment variables?

I have set my environment variable using /etc/profile: export VAR=/home/userhome Then if I do echo $VAR it shows /home/userhome But when I put reference to this variable into the ...
1
vote
3answers
3k views

Difference between /etc/init.d/networking restart and invoke-rc.d networking restart

Is there any real difference between /etc/init.d/networking restart and invoke-rc.d networking restart (Debian)?
1
vote
2answers
1k views

Can a service script put inside init.d be called at startup and shutdown?

I'm running Red Hat 5.1. I have a script called sysinit that I added as a service using chkconfig --add sysinit. I have the following set in the file: #chkconfig 4 01 01 This creates one symlink ...