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)| package main | |
| import ( | |
| "encoding/csv" | |
| "encoding/json" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "log" |
| " NeoBundle Scripts--------------------------------- | |
| if has('vim_starting') | |
| set runtimepath+=~/.config/nvim/bundle/neobundle.vim/ | |
| set runtimepath+=~/.config/nvim/ | |
| endif | |
| let neobundle_readme=expand('~/.config/nvim/bundle/neobundle.vim/README.md') | |
| if !filereadable(neobundle_readme) | |
| echo "Installing NeoBundle..." |
| git clean -xfd | |
| git submodule foreach --recursive git clean -xfd | |
| git reset --hard | |
| git submodule foreach --recursive git reset --hard | |
| git submodule update --init --recursive |
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)| def wc (fname, options = "-l"): | |
| p = subprocess.Popen(['wc', options, fname], stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
| result, err = p.communicate() | |
| if p.returncode != 0: | |
| return -1 | |
| return int(result.strip().split()[0]) | |
| def tail (fname, n = 30, out = subprocess.PIPE): |