Skip to content

Instantly share code, notes, and snippets.

@shigemk2 shigemk2/mikutter
Created Sep 8, 2014

Embed
What would you like to do?
#!/bin/bash
MIKUTTER=$HOME/projects/mikutter
mstart() {
echo "Starting mikutter: "
echo $MIKUTTER
ruby $MIKUTTER/mikutter.rb &
cd $MIKUTTER && touch MIKU_PID
echo "Saving mikutter's process: "
ps aux | grep mikutter.rb | grep -v grep | awk '{print $2}' > MIKU_PID
}
mstop() {
echo -n "Stopping mikutter: "
cd $MIKUTTER && cat MIKU_PID | xargs kill -9
cd $MIKUTTER && rm MIKU_PID
}
case "$1" in
start)
mstart
;;
stop)
mstop
;;
restart)
mstop
mstart
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.