经过几天测试,发现阿里云新加坡服务器真香…访问速度和性能都比linode日本强,价钱差不多…刚好是月底,所有数… 继续阅读从linode回国了
标签: bash
daemon化leanote
之前说到安装好leanote,可以开机自动运行了,但是控制起来很不方便,于是就找到了一个脚本,就是前一篇日志 … 继续阅读daemon化leanote
July 24, 2016 at 12:54PM
查看原文
Go Revel init script for CentOS 6.x
Go Revel init script for CentOS 6.x:
centos6-init-script.sh
#!/bin/bash # revel-app go/revel daemon # chkconfig: 345 20 80 # description: revel-app daemon # processname: revel-app NAME="revel-app" PIDFILE=/var/run/$NAME.pid DAEMON_PATH="/opt/revel-app" DAEMON="/bin/bash run.sh" DAEMON_OPTS="" case "$1" in start) printf "%-50s" "Starting $NAME..." if [ -f $PIDFILE ]; then echo "Already running? (pid=`cat $PIDFILE`)" else cd $DAEMON_PATH PID=`$DAEMON $DAEMON_OPTS > /dev/null 2>&1 & echo $!` echo "$PID" > $PIDFILE echo "Ok. (pid=$PID)" fi ;; status) printf "%-50s" "Checking $NAME..." if [ -f $PIDFILE ]; then PID=`cat $PIDFILE` if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then printf "%s\n" "Process dead but pidfile exists." else echo "Running. (pid=$PID)" fi else printf "%s\n" "Service not running." fi ;; stop) printf "%-50s" "Stopping $NAME" if [ -f $PIDFILE ]; then PID=`cat $PIDFILE` pkill -9 -P $PID printf "%s\n" "Ok." rm -f $PIDFILE else printf "%s\n" "Already stoppied? $PIDFILE not found." fi ;; restart) $0 stop sleep 5 $0 start ;; *) echo "Usage: $0 {status|start|stop|restart}" exit 1 esac
Sent By IFTTT
自建leanote成功
由于Evernote对免费用户越来越不厚道,已经转用微软的OneNote了,但是OneNote的同步速度很慢。… 继续阅读自建leanote成功