The tag has no usage guidance.

learn more… | top users | synonyms

-1
votes
0answers
9 views

Why are processes run with nohup in rc.local killed? [migrated]

I have the following script under raspbian jessie: file test.sh contains: #!/bin/sh -e nohup sleep 321 & sleep 120 false exit 0 When run as normal user in a terminal session, I have the ...
0
votes
1answer
2k views

rc.local not being run on Fedora 23

I have an iptables script I want to run at boot. I created /etc/rc.d/rc.local file with CHMOD 755 permissions which have worked on previous operating systems. Root owns the file. I also have #!/bin/...
0
votes
1answer
28 views

Unison on bootup

So i have unison running thru a config file by default. In here it applies the wait=watch function so it syncs automatically. but i wanted to run unison on boot, but i haven't been able to this this. ...
0
votes
1answer
52 views

rc.local only runs first command

I use /etc/rc.local to autostart two services. sh /home/ubuntu/osrm.sh || /bin/true sh /home/ubuntu/photon.sh || /bin/true || /bin/true is used to ensure that it always succeeds even if the shell ...
0
votes
1answer
105 views

Not getting GUI after rc.local execution in Centos6.6

This is CentOS 6.6 server with GUI. I have place my startup commands in /etc/rc.local The service running on this server are Docker and Nginx. So I have put Container start up command with port ...
1
vote
2answers
221 views

Restoring iptables at boot (rc.local)

I have saved my iptables rules using the iptables-save > command and i am trying to restore these rules when the machine boots up. I have added the command iptables-restore < "path to rules file"...
11
votes
4answers
32k views

Execute script from rc.local as user instead of root

I want to execute a script every time my server start up. The problem is that I need to be a certain user to execute the script, if I try to do it as root it cant find certain packages (such as ruby). ...
-1
votes
1answer
200 views

autostart rc.local 2>&1 redirect, 'open /dev/tty: No such device or address'

I'm trying to execute this command with rc.local: wget http://address/file -P /root/ 2>&1 | stdbuf -o0 awk '/[.] +[0-9][0-9]?[0-9]?%/ { print substr($0,63,3) }' | whiptail --gauge "Progress" 6 ...
1
vote
1answer
149 views

rc.local, call commands sequentially (one after finishing the other)

I was expecting that in rc.local, If say I call program P1 in one line and then P2 in the following line, P2 would only be executed after P1 (on which it depends for successful execution). This is the ...
0
votes
1answer
3k views

On a Debian 7.5 rc.local won't be run at boot

I am struggling to figure out why rc.local won't be executed at boot time. The file itself is executable, it is called from /etc/rc2.d Also the file when from command line won't return any errors. Any ...
3
votes
1answer
3k views

startpar process left hanging when starting processes from rc.local or init.d

I have a peculiar issue when starting ongoing(service-like) processes from either full blown init.d script (SysV style) or a simple one-line call from rc.local file like so: su someuser -c "/home/...
3
votes
1answer
3k views

Run python script inside /etc/rc.local doesn't work

I modified /etc/rc.local on my Amazon AWS AMI #!/bin/sh touch /var/lock/subsys/local # setup hostname properly /usr/bin/python /root/automation/initSystem.py so last line calls Python script that ...
-1
votes
2answers
405 views

run ntpdate from rc.local [closed]

My /etc/rc.local is: #!/bin/sh touch /var/lock/subsys/local /data/automatic/ntpdate.sh My /data/automatic/ntpdate.sh is: #!/bin/sh echo "RWQERWER" >> /data/logs/1.log ntpdate ntp.fudan.edu....
0
votes
2answers
2k views

How to run a shell script on my amazon instance when it bootsup?

I have my amazon instance, i need to add a shell script to its rc.local file so that the shell script executes when i boot my instance. how to set permission to my shell script in rc.local file? if i ...
4
votes
2answers
6k views

Getting Xvfb to start upon booting system in Ubuntu Maverick

I'm trying to get Xvfb to run when the system starts up on Ubuntu 10.10 (Maverick), but it's not working. In /etc/rc.local, I have the following: /root/start_xvfb.sh >> /var/log/start_xvfb....
1
vote
2answers
4k views

Process in rc.local does not seem to run — where to see?

I want to run a process in rc.local (Ubuntu Natty) but I am having trouble determining if it has run. I added /bin/sleep 10 /usr/bin/killall PassengerWatchdog /bin/echo "Killall returned with code $?...
1
vote
1answer
612 views

Using rc.local to run a command on boot

I am running CentOS and want to execute a command when the system is booted. Reading other posts on ServerFault the recommend file to use is rc.local. However, rc.local exists in both /etc/ and /etc/...
6
votes
4answers
1k views

postgresql on Ubuntu 10.4 doesn't start on boot

I'm trying to have postgresql 8.4 start on boot on Ubuntu server 10.04 (64bit). First, I tried putting: su -c 'pg_ctl start -D /home/postgres -l /home/postgres/serverlog' --preserve-environment ...
1
vote
2answers
1k views

RHEL Need To Boot Without rc.local

I am running RHEL 5.5. I edited my rc.local file, but I made a bad change because now when I try to boot RHEL, I get to my normal background but the login prompt does not appear now. Is there a way I ...
3
votes
2answers
5k views

/etc/rc.local not being run on Ubuntu Desktop Install

I have been trying to get sphinx to run at boot, so I added some lines to /etc/rc.local but nothing happens when I start up. If i run it manually it works however. /etc/init.d/rc.local start works ...
0
votes
2answers
6k views

How to test /etc/rc.d/rc.local to make sure a command will start successfully at boot?

I'm using tyrantmanager to manage several instances of Tokyo Tyrant. It's working fine. I want to get it to start at boot, so I add the following command into /etc/rc.local: /usr/local/bin/...
4
votes
1answer
2k views

Why does rc.local require absolute paths? How can I run a script at startup that doesn't use them?

I have a script that runs at startup from rc.local in CentOS. This script contains a command to compile my erlang project using a third party build command called rebar. The rebar line fails to ...
0
votes
1answer
921 views

fwbuilder/iptables manually scripted + autogenerated rules at startup?

Fedora 11 Our previous IT-guy setup iptable rules on our firewall in a way that is confusing me and he didn't document any of it. I was hoping someone could help me make some sense of it. The ...
0
votes
1answer
149 views

ubuntu shell(sh) script missing some line

I create some script for a static route, called "my.rc.route" and i put it on /etc/rc.local, so everytime the server get restarted the script shall run after all the startup process. I feel a bit ...
2
votes
3answers
2k views

Slackware scripts started at boot time need env vars from /etc/profile.d/* to be set

Hey, I have this problem, that scripts started at boot time from rc.local don't have environment variables (defined at /etc/profile.d/*) set at the time of their startup. What should I do ? "su - ...