Created
October 23, 2014 19:37
-
-
Save kemitche/701cb8da5760a53f0dc5 to your computer and use it in GitHub Desktop.
This file contains 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 | |
if [ "$1" == "list" ]; then | |
if [ "$2" == "all" ]; then | |
sudo initctl list | grep reddit | |
else | |
sudo initctl list | grep reddit | grep 'start/running' | |
fi | |
exit; | |
fi | |
if [ "$1" == "shell" ]; then | |
cd /home/reddit/public/r2 | |
exec paster shell run.ini | |
exit; | |
fi | |
if [ "$1" == "log" ]; then | |
exec sudo tail -f /var/log/upstart/reddit-paster.log | |
exit; | |
fi | |
sudo initctl emit reddit-$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment