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

fix shellscript paths for autostart, fix path for manage.py in runatboot.sh #247

Merged
merged 4 commits into from
Jul 19, 2013
Merged

fix shellscript paths for autostart, fix path for manage.py in runatboot.sh #247

merged 4 commits into from
Jul 19, 2013

Conversation

gimick
Copy link
Contributor

@gimick gimick commented Jul 18, 2013

fixes for server start linux scripts -
a) in autostart mode "service kalite start"
b) when running interactively but outside of the ka-lite working directory.

Also, fix for runatboot.sh which was failing when run interactively because of the path to the manage.py command.

To test,
i) install a system with autostart set true (i.e. with a kalite script in etc/init.rc/
ii) try the following commands without this patch:
$ ~/path to ka-lite/start.sh
$ service kalite start
$ sudo ~/path to ka-lite/kalite/runatboot.sh
iii) repeat those commands with the patch - there should be no errors

@gimick
Copy link
Contributor Author

gimick commented Jul 18, 2013

fixes #246

@ghost ghost assigned dylanjbarth Jul 18, 2013
@bcipolli
Copy link
Contributor

@dylanjbarth if you can pull this code and test, I will be happy to code review. If you have time for code review as well, I'm glad to "back you up" (i.e. look at it on my own as well), so you feel confident!

@gimick
Copy link
Contributor Author

gimick commented Jul 18, 2013

discussed with @jamalex these scripts were probably modified previously to work on osx - hopefully these latest fixes are cross-platform. I don't have osx to test, so would appreciate a mac test too if poss.

@bcipolli
Copy link
Contributor

@gimick This should be perfectly fine, as all of these scripts already reference dirname ( ${BASH_SOURCE[0]} ) (from commit e346f04 ).

These should be a shared method / variable across scripts. Will make that change across scripts, and do a pull request against your repo.

@dylanjbarth will try this out tomorrow as well.

@bcipolli
Copy link
Contributor

Additional test cases:

  • Access from "ka lite" repo dir (instead of ka-lite)
  • Access with absolute path names (e.g. "/Users/bcipolli/demo/ka lite/kalite/serverstop.sh")

We should add some regression tests for this. Will talk with @dylanjbarth about doing this.

@dylanjbarth
Copy link
Contributor

@gimick I tested on Mac and everything looks fine. Can you confirm that you've retested with @bcipolli 's changes? After that I think we're good to go. Thanks!

@gimick
Copy link
Contributor Author

gimick commented Jul 19, 2013

@dylanjbarth just retested on Linux everything seems fine, but I have found one new issue which is probably linux only - as suggested by @bcipolli,I re-installed in a folder with an embedded space, and the autostart daemon failed to start on debian. I have fixes and will push again shortly

@gimick
Copy link
Contributor Author

gimick commented Jul 19, 2013

@dylanjbarth have just pushed 3 small changes to fix spacesin the path when autostarting. I don't know if you are able to retest linux deamon start/stop on osx, but if you can can you try this:

rename "ka-lite" to "ka lite"
sudo ./runatboot.sh (regenerates /etc/init.d/kalite file with quotes around the calls to start and stop)
service kalite start (There should be no errors and the daemons should be running after start)
service kalite stop (there should be no errors)

@bcipolli
Copy link
Contributor

Looks great; I reviewed the changes and tested start/stop on mac!

bcipolli pushed a commit that referenced this pull request Jul 19, 2013
fix shellscript paths for autostart, fix path for manage.py in runatboot.sh
@bcipolli bcipolli merged commit f11cf0e into learningequality:develop Jul 19, 2013
bcipolli pushed a commit to arnaudbenard/ka-lite that referenced this pull request Aug 22, 2013
fix shellscript paths for autostart, fix path for manage.py in runatboot.sh
@gimick gimick deleted the autostart_on_linux branch November 17, 2013 21:49
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

Successfully merging this pull request may close these issues.

3 participants