OpenCloud: relocate apps dir

This commit is contained in:
vhsdream 2025-06-15 05:54:31 -04:00
parent 709a9f8bf9
commit 21709c008c
2 changed files with 5 additions and 8 deletions

View File

@ -32,7 +32,7 @@ function update_script() {
RELEASE=$(curl -s https://api.github.com/repos/opencloud-eu/opencloud/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') RELEASE=$(curl -s https://api.github.com/repos/opencloud-eu/opencloud/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ "${RELEASE}" != "$(cat /etc/opencloud/version)" ]] || [[ ! -f /etc/opencloud/version ]]; then if [[ "${RELEASE}" != "$(cat /etc/opencloud/version)" ]] || [[ ! -f /etc/opencloud/version ]]; then
msg_info "Stopping $APP" msg_info "Stopping $APP"
systemctl stop opencloud systemctl stop opencloud opencloud-wopi
msg_ok "Stopped $APP" msg_ok "Stopped $APP"
msg_info "Updating $APP to v${RELEASE}" msg_info "Updating $APP to v${RELEASE}"
@ -41,7 +41,7 @@ function update_script() {
msg_ok "Updated $APP to v${RELEASE}" msg_ok "Updated $APP to v${RELEASE}"
msg_info "Starting $APP" msg_info "Starting $APP"
systemctl start opencloud systemctl start opencloud opencloud-wopi
msg_ok "Started $APP" msg_ok "Started $APP"
echo "${RELEASE}" >/etc/opencloud/version echo "${RELEASE}" >/etc/opencloud/version
@ -59,4 +59,4 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:9200${CL}" echo -e "${TAB}${GATEWAY}${BGN}https://<your-OpenCloud-domain>${CL}"

View File

@ -13,9 +13,6 @@ setting_up_container
network_check network_check
update_os update_os
# msg_info "Installing Dependencies"
# msg_ok "Installed Dependencies"
read -r -p "Enter the hostname of your OpenCloud server: " oc_host read -r -p "Enter the hostname of your OpenCloud server: " oc_host
if [[ "$oc_host" ]]; then if [[ "$oc_host" ]]; then
OC_HOST="$oc_host" OC_HOST="$oc_host"
@ -53,7 +50,7 @@ CONFIG_DIR="/etc/opencloud"
ENV_FILE="${CONFIG_DIR}/opencloud.env" ENV_FILE="${CONFIG_DIR}/opencloud.env"
curl -fsSL "https://github.com/opencloud-eu/opencloud/releases/download/v${OPENCLOUD}/opencloud-${OPENCLOUD}-linux-amd64" -o /usr/bin/opencloud curl -fsSL "https://github.com/opencloud-eu/opencloud/releases/download/v${OPENCLOUD}/opencloud-${OPENCLOUD}-linux-amd64" -o /usr/bin/opencloud
chmod +x /usr/bin/opencloud chmod +x /usr/bin/opencloud
mkdir -p "$DATA_DIR"/assets/apps "$CONFIG_DIR" mkdir -p "$DATA_DIR" "$CONFIG_DIR"/assets/apps
echo "${OPENCLOUD}" >/etc/opencloud/version echo "${OPENCLOUD}" >/etc/opencloud/version
msg_ok "Installed ${APPLICATION}" msg_ok "Installed ${APPLICATION}"
@ -84,7 +81,7 @@ COLLABORATION_WOPI_SRC=https://${WOPI_HOST}
COLLABORATION_JWT_SECRET= COLLABORATION_JWT_SECRET=
# Applications # Applications
WEB_ASSET_APPS_PATH=${DATA_DIR}/assets/apps WEB_ASSET_APPS_PATH=${CONFIG_DIR}/assets/apps
EOF EOF
cat <<EOF >/etc/systemd/system/opencloud.service cat <<EOF >/etc/systemd/system/opencloud.service