Last active
March 20, 2016 16:13
-
-
Save MOZGIII/4438209 to your computer and use it in GitHub Desktop.
Start script for RVM + Thin + unix socket.
Should be located in the project's root directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
sudo -u www-data touch $DIR/tmp/sockets/thin.sock | |
rvmsudo -u www-data bundle exec thin start -C thin.yml --socket $DIR/tmp/sockets/thin.sock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rvmsudo -u www-data bundle exec thin stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is outdated. I recommend using runit or systemd to manage these kinds of services. Both can work in unprivileged (non-root) mode.