Open-rc doesnt work:
rc-service gitea start
mkdir: cannot create directory ‘/sys/fs/cgroup/openrc/gitea’: Permission denied
I do use
lxc and lxd version 3.0.3 on father host with ubuntu 16.04 LTS
gentoo amd64 20200418 as a child vm container
gitea software from gentoo portage in child vm container
The openrc script in the child vm gentoo container, under /etc/init.d/gitea, looks like this:
#!/sbin/openrc-run
Copyright 2016-2019 Gentoo Authors
Distributed under the terms of the GNU General Public License v2
description=“Gitea, a self-hosted Git service”
: ${GITEA_CONF:=/etc/gitea/app.ini}
: ${GITEA_USER:=git}
: ${GITEA_GROUP:=git}
: ${GITEA_WORK_DIR:=/var/lib/gitea}
: ${GITEA_CUSTOM:=${GITEA_WORK_DIR}/custom}
command="/usr/bin/gitea web"
command_args="–config ${GITEA_CONF}"
command_background=“true”
command_user="${GITEA_USER}:${GITEA_GROUP}"
error_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.err"
pidfile="/run/${RC_SVCNAME}.pid"
required_files="${GITEA_CONF}"
start_stop_daemon_args="-d ${GITEA_WORK_DIR}"
start_stop_daemon_args="${start_stop_daemon_args} -e GITEA_WORK_DIR=${GITEA_WORK_DIR}"
start_stop_daemon_args="${start_stop_daemon_args} -e GITEA_CUSTOM=${GITEA_CUSTOM}"
Running the command “gitea” from terminal works - even with another, restricted user.