Code Monkey home page Code Monkey logo

Comments (9)

ddries avatar ddries commented on September 14, 2024

Hi,

I understand you followed "Method 1" in the README?

  1. Install with install.sh (Copies d2c.sh into /usr/local/bin)
  2. Create etc/d2c/d2c.toml and fill your own configuration
  3. Run d2c.sh

I just tried the process and worked fine:

root@DRIES:~/temp/d2c.sh# ./install
Successfully installed d2c.sh into /usr/local/bin.
Please, run d2c.sh from command-line before scheduling any cronjob.
Help: `d2c.sh --help` or `d2c.sh -h` or `d2c.sh help`.

root@DRIES:~/temp/d2c.sh# d2c.sh
Error: 'yq' required and not found.
Please install: https://github.com/mikefarah/yq.

( ... install yq ... )

root@DRIES:~/temp/d2c.sh# d2c.sh
Directory: /etc/d2c/ does not exist.
Creating...
Created /etc/d2c/. Please, fill /etc/d2c/d2c.toml.

from d2c.sh.

alfirus avatar alfirus commented on September 14, 2024

I tried. Maybe because of d2c.toml permission attribute?

-rw-r--r-- 1 root root 243 May 20 17:57 /etc/d2c/d2c.toml

from d2c.sh.

alfirus avatar alfirus commented on September 14, 2024

What is your file permission attribute?

from d2c.sh.

ddries avatar ddries commented on September 14, 2024

Hi! Sorry for the delay. First of all, I would like to thank you for giving a try to d2c.sh. Let's try to make it work for you!

My file permissions are the same as you:

root@DRIES:/etc/d2c# ls -la
total 12
drwxr-xr-x  2 root root 4096 May 20 08:24 .
drwxr-xr-x 81 root root 4096 May 20 08:24 ..
-rw-r--r--  1 root root  148 May 20 08:24 d2c.toml

Are you able to edit d2c.toml using a text editor? Maybe sudo nano /etc/d2c/d2c.toml.
Plus, could you check file permissions for the actual executable?

Mine:

root@DRIES:/usr/local/bin# ls -la d2c.sh
-rwxr-xr-x 1 root root 3469 May 20 08:23 d2c.sh

Let me try in a different host to check I get the same error as you do.

from d2c.sh.

alfirus avatar alfirus commented on September 14, 2024

Are you able to edit d2c.toml
Yes

check file permissions for the actual executable?
Same as yours.

I'll try to install and setup as root and give you feedback

from d2c.sh.

alfirus avatar alfirus commented on September 14, 2024

Same even i install as
su - root

from d2c.sh.

alfirus avatar alfirus commented on September 14, 2024

However i edit d2c.sh

from
config_file_dir="/etc/d2c/"
to
config_file_dir=""

and put the dc2.toml in the same directory, it work.

from d2c.sh.

ddries avatar ddries commented on September 14, 2024

Mmmm, that is very strange. I guess that for some reason that I don't understand, d2c.sh can't read the /etc/ directory. You can put d2c.toml wherever you want and it will work, I guess you can try the home directory for better organization, maybe

config_file_dir="$HOME/.d2c/"

Whatever you prefer!

from d2c.sh.

alfirus avatar alfirus commented on September 14, 2024

For info, i'm using

  • Ubuntu 22.04
  • Install and config always using sudo

Suggestion, maybe you can add cronjob script run every 10 minutes in d2c.sh. It will help safe time.

from d2c.sh.

Related Issues (4)

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.