-
-
Save sachin21/05b569108508088c76385dfc8f582011 to your computer and use it in GitHub Desktop.
Start Google IME Server for SKK
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
#!/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