#!/bin/sh umask ${UMASK} if [ "$1" = "version" ]; then ./openlist version else # Check file of /opt/openlist/data permissions for current user # 检查当前用户是否有当前目录的写和执行权限 if [ -d ./data ]; then if ! [ -w ./data ] || ! [ -x ./data ]; then cat </dev/null fi runsvdir /opt/service/start & else # If aria2 should NOT run and target directory exists, remove it if [ -d "$ARIA2_DIR" ]; then rm -rf "$ARIA2_DIR" fi fi exec ./openlist server --no-prefix fi