ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    debian bookworm and cron aliases not expanding

    IT Discussion
    3
    5
    574
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pattonb
      last edited by

      As mentioned in the subject line, I upgraded my backup server (debian bullseye) to debian bookworm yesterday. Since I upgraded, the aliases in crontab are not expanding. The aliases are sent a backup report from the rsync command line (cron job). Previous debian dist were fine when upgrading. I have done a search and could not find anything. Has anybody seen this issue ?

      travisdh1T 1 Reply Last reply Reply Quote 0
      • travisdh1T
        travisdh1 @pattonb
        last edited by

        @pattonb I know it's a pain, but I never use aliases, especially in crantab since crontab gets executed in a different shell environment.

        If your command is to long without the alias, perhaps it would be better to put it in a shell script to use in cron instead of the command directly?

        P 1 Reply Last reply Reply Quote 0
        • P
          pattonb @travisdh1
          last edited by

          @travisdh1
          It is in a shell script, crontab just runs the script. The script is about 17 lines.
          The weird thing is ( to me) , this backup server has been in operation for about 10+ years, so
          minimal changes ( hardware over the time frame), and I started with Debian squeeze, and I have
          never had any issues aside of a failing disk on the raid array. It has something to do with the
          upgrade to Bookworm, I guess I will need to look over the release notes again, and/or replace postfix.

          1 Reply Last reply Reply Quote 0
          • dafyreD
            dafyre
            last edited by

            If you're running a script that relies on the aliases, you can add the aliases to the top of the script if you need to.

            P 1 Reply Last reply Reply Quote 1
            • P
              pattonb @dafyre
              last edited by

              @dafyre of course. The aliases are email addresses, as the cronjob output needs to be emailed
              to a few/several recipients. The script runs fine. I have zero issues with the script. It is just
              the email aliases are not expanding ( /etc/aliases) .I am puzzled as it has worked fine for literally years.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post