#!/bin/sh # start up and monitor servers # 2013-09-27 10:28 created by niujiuru # 2026-01-05 13:40 updated by niujiuru start() { sh ${CWD}/serverdaemon & } stop() { pidfile="${APPRUNS_PATH}/serverdaemon.pid" [ -f "$pidfile" ] || return 0 pid=$(cat ${APPRUNS_PATH}/serverdaemon.pid) kill -9 "$pid" 2>/dev/null rm -f "$pidfile" }