Skip to content

Instantly share code, notes, and snippets.

@bixu
Created October 21, 2013 22:03
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 bixu/7091748 to your computer and use it in GitHub Desktop.
Save bixu/7091748 to your computer and use it in GitHub Desktop.
proposed future svcadm/smf behavior
> 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