Persist a chron job

Options
Hi guys

Got a bit of problem with a NAS326

I'm trying to create a persistent root chron job. I only found out recently that the Zyxel upon rebooting refreshes/reloads the OS and overwrites some (or all) files such as crontab.

I think I managed to follow along with most of what was explained in another post https://community.zyxel.com/en/discussion/8219/zyxel326-lost-settings-after-reboot-and-other

Here's a snapshot of where I got to:
Created a directory as instructed (zy-pkgs) and downloaded the web_prefix
App Center installed MetaRepository
App Center installed Tweaks
App Center installed RandomTools

I'm struggling to understand the rest of the instructions and I can't find any "Change Home Dir" tool :anguished:

There was something I needed to with /etc/profile file but I'm at a loss at this point.

From my understanding, I'm making root's home directory on the NAS drive rather than making it refer to memory so that any changes become permanent rather than losing it all after a reboot. Presumably something I've installed makes the boot process check if there is a home directory present on the NAS drive. I don't know though, I'm speculating. Can anyone offer help to complete this setup?

Many thanks


Accepted Solution

  • Mijzelf
    Mijzelf Posts: 2,605  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Options
    Dal1980 said:
    The Tweaks webinterface just keeps trying to load the page with nothing happening.
    Oh? That is not the intention. Either your webserver or Tweaks is broken.

    Can you try to run:

    REQUEST_URI='/pkg/Tweaks/pkgcgi.cgi' /i-data/sysvol/.PKG/Tweaks/gui/Tweaks/pkgcgi.cgi 

    that should output the whole html page, ending with a '</body>'.

    If it doesn't, try

    REQUEST_URI='/pkg/Tweaks/pkgcgi.cgi' sh -x /i-data/sysvol/.PKG/Tweaks/gui/Tweaks/pkgcgi.cgi

    to see a 'debug log', and give me the last 10 lines, or more, if you think they are significant.






All Replies

  • Mijzelf
    Mijzelf Posts: 2,605  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    Giving root a persistent homedirectory won't make your cronjob persistent. Instead use the cron feature in the Tweaks webinterface. (And the 'change home dir' can also be found there)
  • Dal1980
    Options
    Thanks Mijzelf

    The Tweaks webinterface just keeps trying to load the page with nothing happening. Is there something I've missed when installing the MetaRepository tools or do I need to add/change some settings somewhere?

  • Mijzelf
    Mijzelf Posts: 2,605  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Options
    Dal1980 said:
    The Tweaks webinterface just keeps trying to load the page with nothing happening.
    Oh? That is not the intention. Either your webserver or Tweaks is broken.

    Can you try to run:

    REQUEST_URI='/pkg/Tweaks/pkgcgi.cgi' /i-data/sysvol/.PKG/Tweaks/gui/Tweaks/pkgcgi.cgi 

    that should output the whole html page, ending with a '</body>'.

    If it doesn't, try

    REQUEST_URI='/pkg/Tweaks/pkgcgi.cgi' sh -x /i-data/sysvol/.PKG/Tweaks/gui/Tweaks/pkgcgi.cgi

    to see a 'debug log', and give me the last 10 lines, or more, if you think they are significant.






  • Dal1980
    Options
    Mijzelf said:
    Dal1980 said:
    The Tweaks webinterface just keeps trying to load the page with nothing happening.
    Oh? That is not the intention. Either your webserver or Tweaks is broken.

    Can you try to run:

    REQUEST_URI='/pkg/Tweaks/pkgcgi.cgi' /i-data/sysvol/.PKG/Tweaks/gui/Tweaks/pkgcgi.cgi 

    that should output the whole html page, ending with a '</body>'.

    If it doesn't, try

    REQUEST_URI='/pkg/Tweaks/pkgcgi.cgi' sh -x /i-data/sysvol/.PKG/Tweaks/gui/Tweaks/pkgcgi.cgi

    to see a 'debug log', and give me the last 10 lines, or more, if you think they are significant.


    First command worked and I see the webpage now. Thanks so much.




Consumer Product Help Center