Re: Running a command at startup

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



On Wed, Dec 12, 2018 at 07:04:12PM -0500, Robert Moskowitz wrote:
>
> 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?

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-unit_files

You probably want something that is Type=oneshot.  

-- 
Jonathan Billings <billings@xxxxxxxxxx>
_______________________________________________
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