Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - lewoke

#1
20.1 Legacy Series / Cron Weirdness 2
June 27, 2020, 06:44:40 AM
OPNsense 20.1.7-amd64
FreeBSD 11.2-RELEASE-p20-HBSD
OpenSSL 1.1.1g 21 Apr 2020


I was wondering why an old cronjob was still executed at 6am according to the log files

2020-06-27T06:00:00 configd.py: Waking Thinkserver

when the current config (GUI) was as follows

1 0 1 * * /usr/local/sbin/configctl wake wake
1 0 15 * * /usr/local/sbin/configctl wake wake


A similar issue was reported here: https://forum.opnsense.org/index.php?topic=15420.0

So I checked

oot@OPNsense:~ # cat /var/cron/tabs/nobody

And yes it appeared that my old config was still being used

# DO NOT EDIT THIS FILE -- OPNsense auto-generated file
#
# User-defined crontab files can be loaded via /etc/cron.d
# or /usr/local/etc/cron.d and follow the same format as
# /etc/crontab, see the crontab(5) manual page.
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
#minute hour mday month wday command
0 06 * * * /usr/local/sbin/configctl wake wake


Only after I manually removed the entry in /var/cron/tabs/nobody
and then clicked Apply in the GUI  (without creating/modifing or deleting an entry) the current config was loaded

oot@OPNsense:~ # cat /var/cron/tabs/nobody

# DO NOT EDIT THIS FILE -- OPNsense auto-generated file
#
# User-defined crontab files can be loaded via /etc/cron.d
# or /usr/local/etc/cron.d and follow the same format as
# /etc/crontab, see the crontab(5) manual page.
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
#minute hour mday month wday command
# Origin/Description: cron/1st of Month Wake Thinkserver for ZFS Scrub
1 0 1 * * /usr/local/sbin/configctl wake wake
# Origin/Description: cron/Remote Backup
0 0 1 * * /usr/local/sbin/configctl system remote backup
# Origin/Description: cron/15th of Month Wake Thinkserver for ZFS Scrub
1 0 15 * * /usr/local/sbin/configctl wake wake

#2
Hi,

I'd like to do the following: Opnsense sends a WOL everytime  a client from LAN (own subnet) is requesting access to my home server on OPT1(own subnet).

I know there is the wol plugin but to my knowledge it only allows you to either wake up clients manually or via cron. Any ideas?