#!/bin/sh # # /etc/rc.d/gitea: start/stop gitea daemon # PROG=/usr/bin/lxc-autostart STARTOPTS="-a" STOPOPTS="-s -a" case $1 in start) $PROG $STARTOPTS ;; stop) $PROG $STOPOPTS ;; restart) $0 stop $0 start ;; status) /usr/bin/lxc-ls -f | awk 'NR>1 && $3=="1"' ;; *) echo "usage: $0 [start|stop|restart|status]" ;; esac # End of file