Re: [CentOS] Running a command at startup

2018-12-13 Thread Robert Moskowitz
Thanks, I will study this... On 12/13/18 2:38 PM, Kenneth Porter wrote: --On Wednesday, December 12, 2018 7:04 PM -0500 Robert Moskowitz wrote: So can someone point me to how to make this into a simple systemd service? I'd first create a utility script (untried code!) like this:

Re: [CentOS] Running a command at startup

2018-12-13 Thread Kenneth Porter
--On Wednesday, December 12, 2018 7:04 PM -0500 Robert Moskowitz wrote: So can someone point me to how to make this into a simple systemd service? I'd first create a utility script (untried code!) like this: /usr/local/sbin/BlueLedFunction.sh #!/bin/sh echo "$1" >

Re: [CentOS] Running a command at startup

2018-12-13 Thread Simon Matter
> > > On 12/13/18 8:17 AM, Jonathan Billings wrote: >> On Wed, Dec 12, 2018 at 09:43:56PM -0500, Robert Moskowitz wrote: >>> OK >>> >>> I have had problems in the past with crontab parsing a command. Would I >>> use: >>> >>> @reboot root echo none | tee /sys/class/leds/blue\:heartbeat/trigger

Re: [CentOS] Running a command at startup

2018-12-13 Thread Robert Moskowitz
On 12/13/18 8:17 AM, Jonathan Billings wrote: On Wed, Dec 12, 2018 at 09:43:56PM -0500, Robert Moskowitz wrote: OK I have had problems in the past with crontab parsing a command. Would I use: @reboot root echo none | tee /sys/class/leds/blue\:heartbeat/trigger ? Or do I have to make a

Re: [CentOS] Running a command at startup

2018-12-13 Thread Jonathan Billings
On Wed, Dec 12, 2018 at 09:43:56PM -0500, Robert Moskowitz wrote: > > OK > > I have had problems in the past with crontab parsing a command. Would I use: > > @reboot root echo none | tee /sys/class/leds/blue\:heartbeat/trigger > > ? > > Or do I have to make a script and run that? Since

Re: [CentOS] Running a command at startup

2018-12-13 Thread Jonathan Billings
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

Re: [CentOS] Running a command at startup

2018-12-12 Thread Robert Moskowitz
On 12/12/18 9:17 PM, Richard wrote: Date: Wednesday, December 12, 2018 20:25:48 -0500 From: Robert Moskowitz On 12/12/18 7:11 PM, Leroy Tennison wrote: 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

Re: [CentOS] Running a command at startup

2018-12-12 Thread Richard
> Date: Wednesday, December 12, 2018 20:25:48 -0500 > From: Robert Moskowitz > > > On 12/12/18 7:11 PM, Leroy Tennison wrote: >> 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. > >

Re: [CentOS] Running a command at startup

2018-12-12 Thread RC
if it's Centos/RHEL 7,  you can turn it into a service that starts after boot too,  and cintrol it with systemctl. On 12/12/18 5:04 PM, 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

Re: [CentOS] Running a command at startup

2018-12-12 Thread Robert Moskowitz
Moskowitz Sent: Wednesday, December 12, 2018 6:04 PM To: CentOS mailing list Subject: [EXTERNAL] [CentOS] 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

[CentOS] Running a command at startup

2018-12-12 Thread Leroy Tennison
: [EXTERNAL] [CentOS] 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 "e

[CentOS] Running a command at startup

2018-12-12 Thread Robert Moskowitz
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