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

Making the config persistent #4

Open
petschni opened this issue Nov 29, 2016 · 2 comments
Open

Making the config persistent #4

petschni opened this issue Nov 29, 2016 · 2 comments

Comments

@petschni
Copy link

Sorry for opening another issue but I ran into the following:

I execute the three steps:

$ cf files <replace_me_with_app_name> /app/fetchConfig.sh | sed -e '1,3d' > fetchConfig.sh
$ chmod +x fetchConfig.sh
$ ./fetchConfig.sh

But when executing the script it only returns:

./fetchConfig.sh: line 3: piwikstart-1021: command not found

This is what the config file looks like:

#!/bin/bash
rm ./bluezone/configtweaks/config.ini.php
cf files petschni | piwikstart-1021 /app/htdocs/piwik/config/config.ini.php | sed '/Plugins\[\] = "ExampleAPI"/d' | sed '/Plugins\[\] = "ExamplePlugin"/d' | sed '/Plugins\[\] = "ExampleRssWidget"/d' | sed '/Plugins\[\] = "Feedback"/d' > ./bluezone/configtweaks/config.ini.php
sed -i -e '1,3d' ./bluezone/configtweaks/config.ini.php

Am I missing something here or is there a bug in the script?

@joshisa
Copy link
Owner

joshisa commented Nov 29, 2016

:-) Looks like there's a bug in how the fetchConfig.sh is echo'ed out in the .bluemix.yml. As a temporary workaround, you can tweak the fetchConfig.sh script to look like this:

rm ./bluezone/configtweaks/config.ini.php
cf files <your_app_name> /app/htdocs/piwik/config/config.ini.php | sed '/Plugins\[\] = "ExampleAPI"/d' | sed '/Plugins\[\] = "ExamplePlugin"/d' | sed '/Plugins\[\] = "ExampleRssWidget"/d' | sed '/Plugins\[\] = "Feedback"/d' > ./bluezone/configtweaks/config.ini.php
sed -i -e '1,3d' ./bluezone/configtweaks/config.ini.php

I made a change to handle the toolchain button path of creation here. To further debug, how did you deploy the project (e.g. via the Deploy to Bluemix OR Create Toolchain?). I'm guessing the former in which case the fix is pretty straightforward. Hope things go more smoothly for you from here.

@petschni
Copy link
Author

Thanks for the tweak - that worked!

I used "Deploy to Bluemix".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants