Crontab reset at boot?

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
sedilson
Posts: 7
Joined: Fri Jan 19, 2018 12:19 pm

Crontab reset at boot?

Post by sedilson »

Greetings fellows.

Code: Select all

Gargoyle version 1.12.0   | OpenWrt 18.06 branch               |
Gargoyle revision d8b3cc58| OpenWrt commit 5e4533c
Built December 01, 2019   | Target  ar71xx/ath10k-large
Archer_C7
I noticed that my cronjobs are removed from crontabs at reboot.
To confirm, I have used chattr +i to block root file and reboot. Once taking a look at logread I see:

Code: Select all

Fri Feb 19 21:41:33 2021 daemon.notice procd: /etc/rc.d/S30set_kernel_timezone: touch: /etc/crontabs/root: Operation not permitted
Fri Feb 19 21:51:39 2021 daemon.notice procd: /etc/rc.d/S85webmon_gargoyle: touch: /etc/crontabs/root: Operation not permitted
Fri Feb 19 21:51:39 2021 daemon.notice procd: /etc/rc.d/S85webmon_gargoyle: mv: can't remove '/etc/crontabs/root': Operation not permitted
But why?

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Crontab reset at boot?

Post by Lantis »

What are you trying to achieve?

Yes the crontab is modified dynamically during normal operation by several parts of Gargoyle.
This should not affect any user added ones unless they are the same/similar to regular Gargoyle operations.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

sedilson
Posts: 7
Joined: Fri Jan 19, 2018 12:19 pm

Re: Crontab reset at boot?

Post by sedilson »

I just want that the commands I include on crontab -e persist which is not happening. After some days they are removed somehow from crontab.
Investigating I found that other process changes the file at boot.

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Crontab reset at boot?

Post by Lantis »

Can you provide examples of the commands you are adding? There is only a few possibilities for them to disappear:
1. Your router is full and it is in read-only temporary storage mode
2. You're using commands which are too similar to Gargoyle native cronjobs and are being overwritten

I can't evaluate the 2nd one without you telling me exactly what you're trying to achieve.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply