GithubHelp home page GithubHelp logo

Comments (3)

alphapapa avatar alphapapa commented on September 28, 2024

Okay, but the correct way to solve that problem is to set PATH in the crontab. See man 5 crontab.

from restic-runner.

etique57 avatar etique57 commented on September 28, 2024

I actually followed the advice of this answer:
https://stackoverflow.com/a/2388105

I also find it weird that if PATH was the best practice, the distro packager didn't include it in their default configuration.

Not sure what's the best solution is here, but IMHO a wrapper script should allow to specify the path for the binary, for instance I just switched to a beta binary of restic to address my other issue.

(I'm trying to create a pull request to propose my changes but I can't seem to be able to do it :()

from restic-runner.

alphapapa avatar alphapapa commented on September 28, 2024

I also find it weird that if PATH was the best practice, the distro packager didn't include it in their default configuration.

That's not weird. There are many distros and many packagers. And Unix is old. And it's documented in the man page.

Not sure what's the best solution is here, but IMHO a wrapper script should allow to specify the path for the binary, for instance I just switched to a beta binary of restic to address my other issue.

I would prefer to avoid adding options inside the script itself, because they cause the script to diverge from upstream, making it difficult for users to merge changes. So:

  1. There might be a good reason to do this, but for the sake of crontabs isn't one, because there's already a canonical Unix solution (e.g. this answer on that page: https://stackoverflow.com/a/2409369).
  2. If there is a good reason, it would be better to store the path in a config file or symlink or something, rather than in the script itself.

from restic-runner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.