heychenbin
12/14/2018 - 8:16 AM

start script

#!/usr/bin/env bash

if [ $(pgrep -f ss-local | wc -l) -eq 0 ]; then
    ss-local -c ~/.shadowsocks.json 2>&1 > /dev/null &
fi

if [ $(pgrep -f cow | wc -l) -eq 0 ]; then
    cow --rc ~/.config/cow/.cow.rc 2>&1 > /dev/null &
fi

if [ $(pgrep -f 'hugo server' | wc -l) -eq 0 ]; then
    cd ~/Documents/Notes/output/hugo/
    hugo server -F -D -E 2>&1 > /dev/null &
fi

if [ $(netstat -antp 2>/dev/null | grep godoc | wc -l) -eq 0 ]; then
    godoc -http=:6060 &
fi


echo 'Started!!'