1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/onlyoffice_ynh.git synced 2024-09-03 19:56:11 +02:00

Merge pull request #130 from YunoHost-Apps/use-resources-for-deb-file

Use resources for deb file
This commit is contained in:
Kayou 2024-08-01 17:53:56 +02:00 committed by GitHub
commit 0d427555dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 71 additions and 22 deletions

View file

@ -74,17 +74,15 @@ ram.runtime = "800M"
"libcurl4-openssl-dev",
]
# Manual install in scripts
# [resources.apt.extras.ttf]
# repo = "deb http://deb.debian.org/debian/ bullseye main contrib"
# key = "https://ftp-master.debian.org/keys/release-bullseye.asc"
# packages = ["ttf-mscorefonts-installer"]
# Manual install in scripts
# [resources.apt.extras.onlyoffice]
# repo = "https://download.onlyoffice.com/repo/debian squeeze main"
# key = "https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE"
# packages = "onlyoffice-documentserver"
[resources.sources.main]
amd64.url = "https://github.com/ONLYOFFICE/DocumentServer/releases/download/v8.0.1/onlyoffice-documentserver_amd64.deb"
amd64.sha256 = "82b2e59ff7d3064a2d35614be7669bec88735f0837dac786762f7ba6a595cff3"
arm64.url = "https://github.com/ONLYOFFICE/DocumentServer/releases/download/v8.0.1/onlyoffice-documentserver_arm64.deb"
arm64.sha256 = "3fe98049dc483b04f9deeaa935795c49ff6086649d7d51a4a8e67e2f1a7c6093"
rename = "onlyoffice-documentserver.deb"
autoupdate.asset.amd64 = "^onlyoffice-documentserver_amd64.deb$"
autoupdate.asset.arm64 = "^onlyoffice-documentserver_arm64.deb$"
autoupdate.strategy = "latest_github_release"
[resources.database]
type = "postgresql"

View file

@ -32,15 +32,9 @@ _install_onlyoffice_deb() {
# the install/configure of their package, which is awful since that will
# restart NGINX and the whole webadmin and maybe even the YunoHost command
# running the install...
# Do not replace app dependencies
YNH_INSTALL_APP_DEPENDENCIES_REPLACE="false"
# Can't do that in the manifest because we need the debconf-set-selections and postgresql already configured
ynh_exec_warn_less ynh_install_extra_app_dependencies \
--repo="https://download.onlyoffice.com/repo/debian squeeze main" \
--key="https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE" \
--package="onlyoffice-documentserver"
ynh_setup_source --dest_dir="$install_dir"
ynh_package_install $install_dir/onlyoffice-documentserver.deb
}
#=================================================

View file

@ -50,6 +50,22 @@ chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R ds:ds "$install_dir"
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
for service in "ds-converter" "ds-docservice" "ds-metrics"; do
yunohost service add "$service"
done
#=================================================
# START SERVICES
#=================================================
for service in "ds-converter" "ds-docservice" "ds-metrics"; do
ynh_systemd_action --action=restart --service_name="$service"
done
#=================================================
# NGINX CONFIGURATION
#=================================================

View file

@ -7,6 +7,17 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# REMOVE SERVICE FROM ADMIN PANEL
#=================================================
for service in "ds-converter" "ds-docservice" "ds-metrics"; do
if yunohost service status "$service" >/dev/null 2>&1
then
yunohost service remove "$service"
fi
done
#=================================================
# REMOVE ONLYOFFICE
#=================================================
@ -25,8 +36,6 @@ ynh_package_autopurge onlyoffice-documentserver
dpkg --configure -a
apt-key del "E09C A29F 6E17 8040 EF22 B409 8320 CA65 CB2D E8E5" 2>/dev/null
#=================================================
# REMOVE SYSTEM CONFIGURATIONS
#=================================================

View file

@ -59,6 +59,22 @@ ynh_script_progression --message="Restoring system configurations related to $ap
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
for service in "ds-converter" "ds-docservice" "ds-metrics"; do
yunohost service add "$service"
done
#=================================================
# START SERVICES
#=================================================
for service in "ds-converter" "ds-docservice" "ds-metrics"; do
ynh_systemd_action --action=restart --service_name="$service"
done
#=================================================
# RELOAD NGINX
#=================================================

View file

@ -55,6 +55,22 @@ chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R ds:ds "$install_dir"
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
for service in "ds-converter" "ds-docservice" "ds-metrics"; do
yunohost service add "$service"
done
#=================================================
# START SERVICES
#=================================================
for service in "ds-converter" "ds-docservice" "ds-metrics"; do
ynh_systemd_action --action=restart --service_name="$service"
done
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================