clpctl: 5: printf: %q: invalid directive #166

Closed
opened 2026-04-05 20:25:38 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jfortunato on 11/15/2024

CloudPanel version(s) affected

6.0.8 (cli)

Description

There is a bug/typo in the /usr/bin/clpctl shell script that causes some commands to fail with this error.

How to reproduce

This works fine

clpctl db:show:master-credentials

Either of these result in an error

sudo clpctl db:show:master-credentials
sh -c 'clpctl db:show:master-credentials'

/usr/bin/clpctl: 5: printf: %q: invalid directive
bash: -c: line 1: unexpected EOF while looking for matching `"'

Possible Solution

The first line in /usr/bin/clpctl is:
#/bin/bash but this should be changed to:
#!/bin/bash

When I manually make this change both of the failed commands above work fine.

Additional Context

Probably related:

#360
#258
#136

*Originally created by @jfortunato on 11/15/2024* ### CloudPanel version(s) affected 6.0.8 (cli) ### Description There is a bug/typo in the `/usr/bin/clpctl` shell script that causes some commands to fail with this error. ### How to reproduce #### This works fine `clpctl db:show:master-credentials` #### Either of these result in an error `sudo clpctl db:show:master-credentials` `sh -c 'clpctl db:show:master-credentials'` >/usr/bin/clpctl: 5: printf: %q: invalid directive >bash: -c: line 1: unexpected EOF while looking for matching `"' ### Possible Solution The first line in `/usr/bin/clpctl` is: `#/bin/bash` but this should be changed to: `#!/bin/bash` When I manually make this change both of the failed commands above work fine. ### Additional Context Probably related: #360 #258 #136
Sign in to join this conversation.