Running a command at startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Does your version of CentOS have the @reboot crontab option?  If it does this is probably easier unless you want to learn how to write systemd files.


Leroy Tennison
Network Information/Cyber Security Specialist
E: leroy@xxxxxxxxxxxxxxxx
2220 Bush Dr
McKinney, Texas
75070
www.datavoiceint.com
TThis message has been sent on behalf
of a company that is part of the Harris Operating Group of
Constellation Software Inc. These companies are listed
here
.
If you prefer not to be contacted by Harris
Operating Group
please notify us
.
This message is intended exclusively for the
individual or entity to which it is addressed. This communication
may contain information that is proprietary, privileged or
confidential or otherwise legally exempt from disclosure. If you are
not the named addressee, you are not authorized to read, print,
retain, copy or disseminate this message or any part of it. If you
have received this message in error, please notify the sender
immediately by e-mail and delete all copies of the
message.

________________________________________
From: CentOS <centos-bounces@xxxxxxxxxx> on behalf of Robert Moskowitz <rgm@xxxxxxxxxxxxxxx>
Sent: Wednesday, December 12, 2018 6:04 PM
To: CentOS mailing list
Subject: [EXTERNAL]  Running a command at startup

On a support forum, I was told that to turn off my board's blue led run:

echo none | sudo tee /sys/class/leds/blue\:heartbeat/trigger

Well, this does not survive a system reboot.  So I was told:

Add the off bit to

     /etc/rc.local

Add it above "exit 0"

So of course, CentOS is past using rc.local and recommends:

# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this fi

So can someone point me to how to make this into a simple systemd service?

thanks


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux