[arm-allstar] ARM-allstar Digest, Vol 73, Issue 42

Peter Paul Fox g8hav at msn.com
Fri Jun 26 17:23:27 EDT 2020


What a fantastic reply. I get similar answers to Chris for Linux queries, where a few commands are sent to you and no explanation.

If you ask for Windows help, the answers seem the opposite; assumption is you haven't a clue so 'it's switch off, unplug etc.'
But a Linux help assumption you know all about command line control. Some replies suggest not to use WinSCP (which I find invaluable finding my way around the structure), you should always use command line.

Many thanks for a clear concise answer with explanation. I have asked that question on a linux forum and just got similar answers to Chris.
Well done Nate



-----Original Message-----
From: ARM-allstar <arm-allstar-bounces at hamvoip.org> On Behalf Of arm-allstar-request at hamvoip.org
Sent: 26 June 2020 17:00
To: arm-allstar at hamvoip.org
Subject: ARM-allstar Digest, Vol 73, Issue 42

Send ARM-allstar mailing list submissions to
	arm-allstar at hamvoip.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
or, via email, send a message with subject or body 'help' to
	arm-allstar-request at hamvoip.org

You can reach the person managing the list at
	arm-allstar-owner at hamvoip.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of ARM-allstar digest..."


Today's Topics:

   1. Adjusting/Turning Off Time Announcement? (Chris Smart)
   2. Re: Adjusting/Turning Off Time Announcement? (Nate Bargmann)


----------------------------------------------------------------------

Message: 1
Date: Thu, 25 Jun 2020 16:19:31 -0400
From: Chris Smart <csmart8 at cogeco.ca>
To: arm-allstar at hamvoip.org
Subject: [arm-allstar] Adjusting/Turning Off Time Announcement?
Message-ID: <d1194dbd-8f98-b961-9cf0-1f97c78c4f1d at cogeco.ca>
Content-Type: text/plain; charset=utf-8; format=flowed

Sorry for asking such a basic question here, but I am not at all a Linux person.


I'd like to adjust the time announcement on my node, either turn it off 
or adjust how often it occurs.


I'm a Windows user.


I am used to using something like WinSCP to access my node and edit 
.conf files. I have also typed the odd thing at the command prompt, but 
I have no idea what to do with the instructions I just got from a friend.


"You need to comment out the appropriate line in your crontab. crontab 
-e to bring up the crontab in Nano."


OK, so I go to the Linux prompt on my node and type:

crontab -e


I have no idea what any of what is then displayed means or refers to or 
what to alter.


Also, is there any way to edit this in a more familiar editor? Like, you 
know, Notepad in Windows?


Thanks. And again, sorry for such a basic question, but I am out of my 
depth here.


Generally, could some of these adjustments, CW/Voice ID, etc. be added 
to a menu somewhere, or is that verboten? :)


Chris




------------------------------

Message: 2
Date: Thu, 25 Jun 2020 20:54:40 -0500
From: Nate Bargmann <n0nb at n0nb.us>
To: arm-allstar at hamvoip.org
Subject: Re: [arm-allstar] Adjusting/Turning Off Time Announcement?
Message-ID: <20200626015440.o6zxtsgzl7y3mgn4 at n0nb.us>
Content-Type: text/plain; charset=us-ascii

* On 2020 25 Jun 17:07 -0500, "Chris Smart via ARM-allstar" wrote:
> Sorry for asking such a basic question here, but I am not at all a Linux
> person.
> 
> 
> I'd like to adjust the time announcement on my node, either turn it off or
> adjust how often it occurs.
> 
> 
> I'm a Windows user.
> 
> 
> I am used to using something like WinSCP to access my node and edit .conf
> files. I have also typed the odd thing at the command prompt, but I have no
> idea what to do with the instructions I just got from a friend.
> 
> 
> "You need to comment out the appropriate line in your crontab. crontab -e to
> bring up the crontab in Nano."
> 
> 
> OK, so I go to the Linux prompt on my node and type:
> 
> crontab -e
> 
> 
> I have no idea what any of what is then displayed means or refers to or what
> to alter.

Hi Chris.

You're staring at this text:


# Do not remove the following line
# required for lsnodes and allmon
15 03 * * * cd /usr/local/sbin; ./astdb.php cron
00 0-23 * * * (source /usr/local/etc/allstar.env ; /usr/bin/nice -19 /usr/bin/p$


In the crontab format the '#' (pound) symbol begins a comment.
Everything from the '#' to the end of the line will be ignored, so you
see the first two lines are comments giving the person editing the
crontab instructions not to remove the next line that is not commented,
the line line that begins with '15'.

The second uncommented line that begins with '00' is the command line of
the script that gives the voice announcements at the top of the hour.

The interval values can be more precisely configured, but here are the basics.

Each interval fields are separated by one or more spaces or tabs.

The first field is the minute of the hour the command should run.  In
this case it is the top of the hour--minute 0.  The allowed values range from
0-59.

The second field is the hours.  Here the range is specified as 0-23 but
could have been a '*' (star) and had the same effect.  The allowed
values range from 0-23.

The third field is the day of the month.  In this case the value is '*'
which always stands for first-last.  The allowed values range from 1-31
(watch this as this field and the next begin with 1, not 0!)

The fourth field is the month.  Again this is set to * and the allowed
range is 1-12.

The fifth field is the day of week and it is likewise set to *.  This
one is tricky as the range is 0-7.  Whoa!  Eight days?  Well, not quite,
the manual says 0 and 7 stand for Sunday.

Text names may be used for the month and day of week.  The manual page
has the details.

The last field is the command to run.  It is passed to the shell that
runs the command, spaces and all.  As this is the command field, cron
does no further separation by spaces so long as it found the first five
fields.

To end the hourly announcements simply put a # at the beginning of the
line that now starts with 00 and save the file when exiting nano.

> Also, is there any way to edit this in a more familiar editor? Like, you
> know, Notepad in Windows?

No, because you are actually editing a special temporary file cron gives
to nano that when it is saved by nano will be parsed by cron for any
errors and if no errors are found is loaded by the cron daemon process
so the changes take effect immediately.

> Thanks. And again, sorry for such a basic question, but I am out of my depth
> here.

We all started some place.  :-)

You can read about the crontab file format with this command:

man 5 crontab

This will start the manual page viewer.  You can use Page-Down and
Page-Up or the Up and Down arrow keys to scroll.  You can search for
text strings with the '/' command.  To exit type 'q' to quit.  You can
learn more by typing:

man man

If you're not sure of what the manual page might be you can use the
apropos command:

apropos cron
anacrontab (5)       - configuration file for Anacron
anacron (8)          - runs commands periodically
cron (8)             - daemon to execute scheduled commands
crond (8)            - daemon to execute scheduled commands
crontab (1)          - maintains crontab files for individual users
crontab (1p)         - schedule periodic background work
crontab (5)          - files used to schedule the execution of programs


One package I install on all my Linux systems is Midnight Commander.  It
is a character User Interface program and makes it much easier to
navigate the file system.  It also features an internal file viewer and
editor.  I've used it so long that I prefer its editor to nano for
various reasons though nano is quite easy as the '^X' notation means
Control-X, etc.  

Midnight Commander can be installed with:

pacman -Sy mc

Have fun!

73, Nate

-- 

"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."

Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819



------------------------------

Subject: Digest Footer

_______________________________________________
ARM-allstar mailing list
ARM-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar


------------------------------

End of ARM-allstar Digest, Vol 73, Issue 42
*******************************************


More information about the ARM-allstar mailing list