E
E
Evgeny Samsonov2012-10-08 13:00:55
linux
Evgeny Samsonov, 2012-10-08 13:00:55

Script not running on Linux Ubuntu startup?

Hello!
There is a small script that runs from the console and works fine, it was necessary to “put” it into autorun, for which I added let to the script in /etc/rc.local/. But when the system starts, the script does not run.
This is what rc.local looks like now:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Запуск скрипта
/usr/sbin/xmmsScript

exit 0

Tell me what could be the problem?
Thank you all in advance for your replies!

Answer the question

In order to leave comments, you need to log in

7 answer(s)
S
sn00p, 2012-10-08
@Dharmantra

By the way, what's the script? rc.local is executed before x's are raised. Maybe he just has nowhere to draw?

S
smartlight, 2012-10-08
@smartlight

What for to fence rc.local?
After all, there is update-rc.d <script_name> defaults - copy the script to /etc/init.d/

H
howeal, 2012-10-08
@howeal

Write to rc.local:
/usr/sbin/xmmsScript &> /tmp/script.log
Reboot and look in /tmp/script.log. I think the problem will be resolved.

S
shadowalone, 2012-10-08
@shadowalone

Are the paths to the programs being executed in the script itself complete or not?
It may very well be that it cannot be executed due to the lack of environment variables.

J
jov, 2012-10-08
@jov

are you sure /etc/rc.local is even running? in fact, the ubuntu developers switched upstart a long time ago.

S
sn00p, 2012-10-08
@sn00p

Also make sure that your runlevel is multiuser, well, that is, not 1)

E
elgoog, 2012-10-08
@elgoog

Does it start or does it start and die?
You can also do this:
bash -c "/usr/bin/screen -d -m script.pl"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question