Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| from elasticsearch import Elasticsearch | |
| from elasticsearch import helpers | |
| es = Elasticsearch(["https://host"]) | |
| #not advised to run without proper ssl auth | |
| import urllib3 | |
| urllib3.disable_warnings() | |
| indexes=es.indices.get("*") | |
| # change old and new string to match your usecase |
| #------------------------------------------------------ | |
| #-------- CTAGS | |
| make-ctags() { | |
| ctags -RBF -f .tags \ | |
| --file-scope=yes \ | |
| --sort=yes \ | |
| --extra=+fq \ | |
| 2>/dev/null | |
| } | |
| make-ctags-css() { |
| #!/bin/bash | |
| nPid=${1-`pgrep -f ossec-remoted`} | |
| nTimes=${2:-100} | |
| delay=${3:-0.1} | |
| strCalc=`top -d $delay -b -n $nTimes -p $nPid \ | |
| |grep $nPid \ | |
| |sed -r -e "s;\s\s*; ;g" -e "s;^ *;;" \ | |
| |cut -d' ' -f9 \ | |
| |tr '\n' '+' \ | |
| |sed -r -e "s;(.*)[+]$;\1;" -e "s/.*/scale=2;(&)\/$nTimes/"`; |
| multiuser on | |
| bindkey "^[[C" next | |
| bindkey "^[[D" prev | |
| defscrollback 1024 | |
| # other bindings | |
| #bindkey -k F1 select 0 ## F11 = screen 0... avoid this screen :/ | |
| bindkey -k k1 select 1 ## F1 = screen 1 |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| #!/bin/bash | |
| mkdir vagrant-chef-elasticsearch | |
| cd vagrant-chef-elasticsearch | |
| time sh <<EOS | |
| vagrant init chef/centos-6.6; vagrant up --provider virtualbox | |
| vagrant ssh -c sh <<EOV | |
| #install chefdk, build essentials, utilities | |
| curl -# -L -k -o /tmp/cookbook-elasticsearch-master.tar.gz https://github.com/elasticsearch/cookbook-elasticsearch/archive/master.tar.gz | |
| sh <<END |
| brew install perl | |
| brew link perl --force |
| #!/bin/bash | |
| LYNX=`which lynx || which yum|| which brew` | |
| PKGMGR=`which yum|| which brew` | |
| #if yum trigger all commands as sudo | |
| [ "$PKGMGR%%yum" != "$PKGMGR" ] && PKGMGR="sudo $PKGMGR" | |
| # install vagrant and virtualbox | |
| $PKGMGR install vagrant virtualbox |
| #!/bin/bash | |
| #Simple Mac gist to get you some widely used dev( ruby ) tools . | |
| #Requirements : | |
| #bash, sudo access | |
| #run this command sh -x <( this_file_raw_link ) 2>&1 | tee /tmp/install.log | |
| #Optional | |
| #index files | |
| #sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist |
| sys_rb_usr=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr | |
| sdk_rb_usr=`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr | |
| sudo cp -r $sdk_rb_usr/include $sys_rb_usr/include | |
| sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer | |
| #prompted the license agreement which needed to be accepted . | |
| #Fix for error: | |
| #============================ |