Skip to content

teslamate-close-charge: syntax error near unexpected token `newline' #4904

@brianmay

Description

@brianmay

Is there an existing issue for this?

  • I have checked the existing issues and discussions, and I can confirm that there are no duplicates.

What happened?

[root@iot2:~]# teslamate-close-charge
/run/current-system/sw/bin/teslamate-close-charge: line 3: 1: Please provide a charge ID to close

[root@iot2:~]# teslamate-close-charge 2790
/run/agenix/teslamate: line 1: syntax error near unexpected token `newline'

[root@iot2:~]# bash teslamate-close-charge 2790
/run/agenix/teslamate: line 1: syntax error near unexpected token `newline'

To me it looks like the shell doesn't like my secrets, and wants the values to be quoted.

But the same file is also read by the systemd service file, and pretty sure environment variables cannot be quoted or you get the quotes included in the value.

Yuck.

I think this file needs to be parsed, and we cannot really use "source" to do it.

I notice my db password has a greater then symbol suspect this is the problem:

DATABASE_PASS=xyzxyz>

(This isn't my password)

Expected Behavior

No errors.

Can the issue reliably be reproduced?

Yes

Steps To Reproduce the issue

No response

Relevant log output

N/A

Screenshots

No response

Additional data

No response

Type of installation

NixOS (https://docs.teslamate.org/docs/installation/nixos)

Version

mcu2-upgraded-cars

PostgreSQL version

No response

Are you running latest major supported PostgreSQL version?

  • I run the latest major supported PostgreSQL version

Are you using a reverse Proxy for TeslaMate?

Yes (specify in next field)

Details about your reverse Proxy if applicable

nginx

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions