Files
alpha-quadrant/www-apps/opencloud-bin/files/initd
T

42 lines
1.2 KiB
Plaintext

#!/sbin/openrc-run
# Copyright 2016-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="OpenCloud - Self-Hosted File Sharing"
depend() {
need net
}
: ${DEFAULT_LANGUAGE:=de}
: ${OC_CONFIG_DIR:=/etc/opencloud/opencloud.yaml}
: ${OC_URL:=https://localhost:9200}
: ${OC_USER:=opencloud}
: ${OC_GROUP:=opencloud}
: ${OC_WORK_DIR:=/var/lib/opencloud}
: ${OC_BASE_DATA_PATH:=${OC_WORK_DIR}/data}
export DEFAULT_LANGUAGE=${DEFAULT_LANGUAGE}
export IDM_CREATE_DEMO_USERS=true
export OC_BASE_DATA_PATH=${OC_BASE_DATA_PATH}
export OC_CONFIG_DIR=${OC_CONFIG_DIR}
export OC_INSECURE=true
export OC_LOG_LEVEL=warning
export OC_URL=${OC_URL}
export PROXY_ENABLE_BASIC_AUTH=true
#capabilities=CAP_NET_BIND_SERVICE
command="/usr/bin/opencloud"
command_args="server"
command_background="true"
command_user="${OC_USER}:${OC_GROUP}"
error_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.err"
output_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
pidfile="/run/${RC_SVCNAME}.pid"
required_files="${OC_CONF}"
start_pre() {
checkpath -m0750 -o "${OC_USER:-root}:${OC_GROUP:-root}" -d /run/opencloud
checkpath -m0750 -o "${OC_USER:-root}:${OC_GROUP:-root}" -d /var/log/opencloud
}