Run .sh (no service) file on startup
Posted
by
MyTitle
on Server Fault
See other posts from Server Fault
or by MyTitle
Published on 2012-10-16T10:58:45Z
Indexed on
2012/10/16
11:04 UTC
Read the original article
Hit count: 220
How to execute a script once at startup time on CentOS 6.3? I added file with following containment
#chkconfig: 2345 95 20
#description: Some description
sh /opt/somePath/my.sh
into /etc/ini.d and it works fine (I executed required chmod
, chkconfig
).
But my.sh file is compatible to run as service. And when I try to run in same way another .sh file (which can't to tun as service) I get exceptions on starting X.
So I want to know how I can run .sh files which are not services.
Thanks.
© Server Fault or respective owner