What's new

amtm amtm 4.9 - the Asuswrt-Merlin Terminal Menu, June 30, 2024 (locked thread)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I just had a weird thing happen - nearly all of my cronjobs disappeared.

I posted another thread about it, but right after posting I realised one change I made was to update amtm earlier today.

It's never happened before - could there be any connection?

The other thread is here...
What other scripts are installed and more of interest, how do you add the cron jobs. The AGTx seem to be custom jobs.
Check the file content, post output if puzzled.
 
There's a lot of reports of lost cron jobs. I lost 8 of them earlier.

I couldn't sleep on this so here's the before reboot and after (a lot more missing than I first thought)

Before:
Code:
12,27,42,57 * * * * /jffs/scripts/spdmerlin generate #spdMerlin#
30 19 */7 * * service restart_letsencrypt #LetsEncrypt#
0 1-23 * * * /jffs/scripts/uiDivStats generate #uiDivStats_generate#
1 0 * * * /jffs/scripts/uiDivStats trimdb #uiDivStats_trim#
* * * * * /jffs/scripts/uiDivStats querylog #uiDivStats_querylog#
4-59/5 * * * * /jffs/scripts/uiDivStats flushtodb #uiDivStats_flushtodb#
00 2 * * Fri /bin/sh /opt/share/diversion/file/update-bl.div reset #Diversion_UpdateBL#
20 5 * * * /bin/sh /opt/share/diversion/file/rotate-logs.div #Diversion_RotateLogs#
20 17 * * * diversion count_ads count #Diversion_CountAds#
30 1 * * Fri /bin/sh /opt/share/diversion/file/stats.div #Diversion_WeeklyStats#
50 */12 * * * sh /jffs/scripts/firewall debug genstats #Skynet_genstats#
*/10 * * * * /jffs/scripts/YazFi check #YazFi#

After:

Code:
45 */6 * * * /jffs/addons/amtm/routerdate cron #amtm_RouterDate#
10 7 * * Sun /bin/sh /jffs/addons/amtm/sc_update.mod -run #amtm_ScriptsUpdateNotification#
15 1 * * * sh /jffs/scripts/backupmon.sh -backup #RunBackupMon#
*/10 * * * * /jffs/scripts/YazFi check #YazFi#
5 0 * * * /opt/sbin/logrotate /opt/etc/logrotate.conf >> /opt/tmp/logrotate.daily 2>&1 #logrotate#
*/10 * * * * /jffs/scripts/ntpmerlin generate #ntpMerlin#
25 8 * * * sh /jffs/scripts/firewall banmalware #Skynet_banmalware#
4 1 * * Mon sh /jffs/scripts/firewall update #Skynet_autoupdate#
0 * * * * sh /jffs/scripts/firewall save #Skynet_save#
12,27,42,57 * * * * /jffs/scripts/spdmerlin generate #spdMerlin#
57 9 */7 * * service restart_letsencrypt #LetsEncrypt#
0 1-23 * * * /jffs/scripts/uiDivStats generate #uiDivStats_generate#
1 0 * * * /jffs/scripts/uiDivStats trimdb #uiDivStats_trim#
* * * * * /jffs/scripts/uiDivStats querylog #uiDivStats_querylog#
4-59/5 * * * * /jffs/scripts/uiDivStats flushtodb #uiDivStats_flushtodb#
00 2 * * Fri /bin/sh /opt/share/diversion/file/update-bl.div reset #Diversion_UpdateBL#
20 5 * * * /bin/sh /opt/share/diversion/file/rotate-logs.div #Diversion_RotateLogs#
20 17 * * * diversion count_ads count #Diversion_CountAds#
30 1 * * Fri /bin/sh /opt/share/diversion/file/stats.div #Diversion_WeeklyStats#
45 */12 * * * sh /jffs/scripts/firewall debug genstats #Skynet_genstats#

So that's
Code:
amtm_RouterDate
amtm_ScriptsUpdateNotification
RunBackupMon
logrotate
ntpMerlin
Skynet_banmalware
Skynet_autoupdate
Skynet_save
All disappeared. I can't find any commonality _ RunBackupMon is the only one in services-start.
 
Use uu.
 
There's a lot of reports of lost cron jobs. I lost 8 of them earlier.
Damnit, do I really have to get out of bed at 1:30 am to investigate?
 
We might have discussed this in the past - @thelonelycoder since the email function in terms of setup works so well in AMTM, it would be nice to have some callable script to send an email.
We've had that for a decade. Gosh the whole "your friendly router" comes from ages ago.
 
I see
We've had that for a decade. Gosh the whole "your friendly router" comes from ages ago.
The blame is on you, you were the one that suggested it :)
 
I see nil evidence that the recent amtm update suddenly went rogue and deleted a bunch of cron jobs, wired a third of your primary savings account over to me and caused the flat on your cars passenger rear tire.
Back to bed for me.
 
I see nil evidence that the recent amtm update suddenly went rogue and deleted a bunch of cron jobs, wired a third of your primary savings account over to me and caused the flat on your cars passenger rear tire.
Back to bed for me.

Yep, this has been happening post-388.6 and before the latest amtm update.
 
quick bugcheck/security check...
 

Attachments

  • amtn.lint.txt
    43.2 KB · Views: 48
Yep, this has been happening post-388.6 and before the latest amtm update.
Glad you are directing the blame to someone else ;)

In other news, it’s a foggy morning, the ravens do their spiel, the sparrows do their chirping and I can hear the faint noise of the Autobahn in the distance. People are up and about doing their thing.
 
No minor update available for me. You sure that's new? Link?
Depending on when you updated amtm, this minor fix was already out by that time. If you’re up to date, you’re good.
 
I was indeed up to date. 😉
The amtm update check only looks at the main file to determine if there’s a version change or an MD5 checksum difference, the latter will trigger minor update available. That’s for all scripts amtm supports.

If I push an update for one of the other files that amtm - or Diversion - automatically includes if needed, it would not be detected by the updater. Hence the uu force update I sometimes post.

For the current case, I initially only uploaded the changed *.mod file for VPNMON-R3 and asked to uu it.
I realized later it is a general fix that affects possibly all users that installed the addon by hand while it was unsupported in amtm.
I usually just change the release date in amtm and that would trigger the minor update flag.
Here, I moved the cj show cronjobs option down below the i option, it needed to go there for a long time, it just never happened with all the other things I changed.
All good now.
 
Last edited:
Far be it from me to criticize, but could you please stop doing the "An amtm update is available, no version change" thing.

I'd much rather have 4.3 / 4.3.1 / 4.3.2 etc.
I like to know what I'm running and what the latest available version is.
 
We might have discussed this in the past - @thelonelycoder since the email function in terms of setup works so well in AMTM, it would be nice to have some callable script to send an email.

Something like:

amtmail foo@bar.com "This is a test subject line" afiletosend

I would love to utilize a "function" like that!! What a great idea! ;)
I have a shell library script that I wrote & have used for several years to add the "email notification" feature to other custom scripts I have. It uses AMTM email configuration variables to send the email.

The library script can be downloaded from my GitHub repository:
Bash:
mkdir -m 755 -p /jffs/scripts/libs
curl -kLSs --retry 3 --retry-delay 5 --retry-connrefused  https://raw.githubusercontent.com/Martinski4GitHub/CustomMiscUtils/master/EMail/CustomEMailFunctions.lib.sh  -o /jffs/scripts/libs/CustomEMailFunctions.lib.sh
chmod 755 /jffs/scripts/libs/CustomEMailFunctions.lib.sh

And here's a sample TEST script showing how to use the above library script:
Bash:
mkdir -m 755 -p /jffs/scripts/libs
curl -kLSs --retry 3 --retry-delay 5 --retry-connrefused  https://raw.githubusercontent.com/Martinski4GitHub/CustomMiscUtils/master/EMail/TEST_SendEMailNotification.sh  -o /jffs/scripts/libs/TEST_SendEMailNotification.sh
chmod 755 /jffs/scripts/libs/TEST_SendEMailNotification.sh

As shown in the TEST script, first the email library script is simply sourced in the script that you want to send emails from. The "_SendEMailNotification_()" function is just an example of how to call the library function using the required parameters: the email subject string & the email body file. If you have the AMTM email config already set up, you can just run the TEST script to send a TEST email to check & verify if it works for you.

You can, of course, modify the TEST script to fit your own specific needs, like making it a callable script to send email notifications.

HTH
 
Far be it from me to criticize, but could you please stop doing the "An amtm update is available, no version change" thing.

I'd much rather have 4.3 / 4.3.1 / 4.3.2 etc.
I like to know what I'm running and what the latest available version is.
Good point.
But with a version change I made it a habit to
  • update the website
  • make a full post here
  • change post #1 in this thread
  • change the thread's title
  • post it on reddit in my subreddit https://www.reddit.com/r/diversion/
  • change the signature on this board
  • upload the changes to GitHub https://github.com/decoderman (which I yet have to do for the 4.3 update)
  • and do some housework for the two amtm versions (legacy and firmware versions) to file them locally
I don't do all that with minor updates - I only create your dreaded post in this thread.
You can probably guess what my preliminary decision is - and the reason why.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top