Questions tagged [rc.local]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

systemd rc.local race condition

Forgive me, I am newer to Linux/Debian/Raspian. The company I work for has a bash script being run from rc.local that updates /etc/hostname file on bootup of a raspberry pi based on the MAC Address ...
0
votes
0answers
26 views

Compatibility with rc-local

Recently I faced issue with rc.local Compatibility. Does anyone had fixed this issue? loaded failed failed /etc/rc.d/rc.local Compatibility systemctl status rc-local.service "OUTPUT" : rc-...
1
vote
3answers
1k views

Debian 9 - rc.local deprecated, how to launch python at startup

I am slightly lost, I have a Debian 9 server and a Python Flask script that I am trying to launch at startup. In the past I have used rc.local to launch things at startup but from reading it seems ...
0
votes
1answer
778 views

How to get node app running on Amazon EC2 instance to start on reboot?

So I have Node/Express app running on an Amazon Linux Ec2 instance (VPC). The path to my node app is as follows /home/ec2-user/server/server.js If I run which forever I get ~/.nvm/versions/node/v6....
1
vote
2answers
1k views

Read Ahead value automatically getting updated at boot

OS version: CentOS Linux release 7.2.1511 (Core) I have the following commands in my rc.local file: /usr/sbin/blockdev --report > /root/test_boot /usr/sbin/blockdev --setra 256 /dev/vdb /usr/sbin/...
2
votes
1answer
230 views

Run rc.local only once Mongodb is running in CentOs 7

I have the following script in my rc.local: This runs the services on ports 8080, 8081, 8082, 8083. They are actually node servers that NEED mongod to startup. So, I edited /lib/systemd/system/rc-...
0
votes
1answer
138 views

Ubuntu-Server Does Not Present Logon After Executing rc.local Script

UPDATE: I completely commented out the rc.local script and the problem still persists. This time though, it seems like the boot process has made it further than before. It's still getting hung though. ...
2
votes
1answer
431 views

Start Rails on boot for AWS EC2

i have a ubuntu EC2 instance and i want start my rails server at boot. So i have a script: start.sh #!/bin/bash # # Start Rails Server cd ~/spree rails server -d and i have this in my rc.local: rc....
0
votes
1answer
668 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 ...
2
votes
2answers
8k 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/...
2
votes
2answers
2k 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"...
1
vote
1answer
85 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
173 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
votes
1answer
564 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
671 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
4k 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 ...
5
votes
1answer
5k 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
5k 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
883 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....
1
vote
2answers
9k 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 ...
1
vote
1answer
1k 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/...
28
votes
4answers
71k 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
vote
2answers
5k 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 $?...
6
votes
4answers
2k 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 ...
2
votes
3answers
9k 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/...
3
votes
2answers
7k 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 ...
4
votes
2answers
3k 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 ...
5
votes
2answers
8k 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
2k 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 ...
0
votes
1answer
174 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 - ...
0
votes
1answer
999 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 ...