Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Subscription command doesn't work #78

Open
navjotjsingh opened this issue Jul 6, 2022 · 4 comments
Open

Subscription command doesn't work #78

navjotjsingh opened this issue Jul 6, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@navjotjsingh
Copy link

navjotjsingh commented Jul 6, 2022

Describe the bug
Running the command ./server.sh create-subscription EMAIL@ADDR doesn't work. It gives the following error.

./server.sh: 85: [[: not found

I am using Ubuntu 22.04.

To Reproduce
Steps to reproduce the behavior:
Run the command ./server.sh create-subscription EMAIL@ADDR

Expected behavior
The subscription for the email account should be activated.

Additional context
I have realized that the solution is either to run the command as bash ./server.sh create-subscription EMAIL@ADDR or change the first line of the file from #!/bin/sh to #!/bin/bash

This should be explained in the docs or a solution should be implemented that works across all Linux distributions and shells.

@navjotjsingh navjotjsingh added the bug Something isn't working label Jul 6, 2022
@jonwsoto
Copy link

jonwsoto commented Jul 28, 2022

you can use phpmyadmin and modify the values yourself here is the two lines from the server.sh that tell you what you need to modify

`$DOCKER_COMPOSE_COMMAND exec db sh -c "MYSQL_PWD=$MYSQL_ROOT_PASSWORD mysql $MYSQL_DATABASE -e
'INSERT INTO user_roles (role_uuid , user_uuid) VALUES ((SELECT uuid FROM roles WHERE name="PRO_USER" ORDER BY version DESC limit 1) ,(SELECT uuid FROM users WHERE email="$EMAIL")) ON DUPLICATE KEY UPDATE role_uuid = VALUES(role_uuid);'
"

$DOCKER_COMPOSE_COMMAND exec db sh -c "MYSQL_PWD=$MYSQL_ROOT_PASSWORD mysql $MYSQL_DATABASE -e
'INSERT INTO user_subscriptions SET uuid=UUID(), plan_name="PRO_PLAN", ends_at=8640000000000000, created_at=0, updated_at=0, user_uuid=(SELECT uuid FROM users WHERE email="$EMAIL"), subscription_id=1, subscription_type="regular";'
"`

@koopernick
Copy link

koopernick commented Aug 5, 2022

I have the exact same issue.

Fresh install, and I can't create an user...

Any proper fix coming ?

Edit : the "fix" from the first post doesn't work for me, on Debian 11.

@mehdiMj-ir
Copy link

same problem on Ubuntu 22.04, I even manage to get the role_uuid 8047edbb-a10a-4ff8-8d53-c2cae600a8e8 but had problem with user_uuid value :(

@antonheitz
Copy link

antonheitz commented Dec 23, 2022

Hi, (@orifiginal fix) this is because the file uses bash syntax but is declared as shell (which points to bash for some sytems). The Pull request #103 fixes this issue and was the reason many people had issues with the file server.

Changing the Shebang will work on all linux systems.

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

No branches or pull requests

5 participants