Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirection problem #37

Open
Mahmoud-Ibrahim-750 opened this issue Jan 12, 2024 · 2 comments
Open

Redirection problem #37

Mahmoud-Ibrahim-750 opened this issue Jan 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Mahmoud-Ibrahim-750
Copy link

Problem:
Here is the error that pops up when I run the app:

***@***:~$ vnstat-client
20:40:26.790 › [PRODUCTION] vnStat Client is Running.
20:40:27.350 › Getting data...
20:40:27.351 › APPIMAGE env is not defined, current application is not an AppImage
20:40:27.457 › Error: Command failed:                                                                       
					if grep -q "$(systemctl is-active vnstat)" <<< "active" ;
						then echo "true"                                        
					else echo "false"
				fi                                          
				
/bin/sh: 2: Syntax error: redirection unexpected

    at ChildProcess.exithandler (node:child_process:408:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Socket.<anonymous> (node:internal/child_process:451:11)
    at Socket.emit (node:events:526:28)
    at Pipe.<anonymous> (node:net:687:12)
20:40:27.461 › Getting data is successfully
20:40:29.980 › vnStat-client has been closed.

And the app is unable to read data from the database however vnstat works perfectly and shows data in the terminal.

Possible solution:
After some research, it looks like that the script is using Dash instead of Bash (because I use Ubuntu) so it may solve the problem if Bash is used instead of using the default shell in the script.
This may not be the best solution and you should consider other possible solutions if found.

@hulxv
Copy link
Owner

hulxv commented Jan 12, 2024

For now, I think you can try this command to run vnstat-client

$ bash -c "vnstat-client"

After college exams, I will try to work on your issue but I want more information about your system. I think the neofetch output will be enough.

@hulxv hulxv added the bug Something isn't working label Jan 12, 2024
@Mahmoud-Ibrahim-750
Copy link
Author

When I tried your suggestion, I got typically the same result I provided earlier.
Anyway here's the neofetch you asked for, If you need more info, just tell me.
neofetch output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants