Created
October 21, 2013 22:03
-
-
Save bixu/7091748 to your computer and use it in GitHub Desktop.
proposed future svcadm/smf behavior
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
> svcprop /application/management/redis | grep "^start" | |
start/exec astring /usr/local/bin/redis-server\ /etc/redis/redis.conf\ \& | |
start/timeout_seconds count 60 | |
start/type astring method | |
> svcprop /application/management/redis | grep "^stop" | |
stop/exec astring /usr/bin/bash\ -c\ \'LISTEN=\`netstat\ -an\ \|\ grep\ \"127.0.0.1.6379\"\ \|\ grep\ LISTEN\`\;\ if\ [\ !\ -z\ \"$LISTEN\"\ ]\;\ then\ /usr/local/bin/redis-cli\ -h\ 127.0.0.1\ -p\ 6379\ shutdown\;\ fi\' | |
stop/timeout_seconds count 300 | |
stop/type astring method | |
> svcprop /application/management/redis | grep "^force-stop" | |
force-stop/exec astring :kill | |
stop/timeout_seconds count 10 | |
stop/type astring method |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment