Skip to content

Instantly share code, notes, and snippets.

@sachin21
Last active February 9, 2018 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sachin21/05b569108508088c76385dfc8f582011 to your computer and use it in GitHub Desktop.
Save sachin21/05b569108508088c76385dfc8f582011 to your computer and use it in GitHub Desktop.
Start Google IME Server for SKK
#!/usr/bin/env zsh
eval "$(rbenv init - zsh)"
istart() {
echo "Starting Google IME Server for SKK..."
nohup rbenv exec google-ime-skk -p 5511 -h '0.0.0.0' &> /tmp/GOOGLE_IME_LOG &
ps aux | fgrep google-ime-skk | fgrep -v grep | awk '{print $2}' > /tmp/GOOGLE_IME_PID
}
istop() {
echo "Stopping Google IME Server for SKK..."
cat /tmp/GOOGLE_IME_PID | xargs kill -9
}
case "$1" in
start)
istart
;;
stop)
istop
;;
restart)
istop
istart
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment