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:
commit
0d427555dd
6 changed files with 71 additions and 22 deletions
|
@ -74,17 +74,15 @@ ram.runtime = "800M"
|
||||||
"libcurl4-openssl-dev",
|
"libcurl4-openssl-dev",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Manual install in scripts
|
[resources.sources.main]
|
||||||
# [resources.apt.extras.ttf]
|
amd64.url = "https://github.com/ONLYOFFICE/DocumentServer/releases/download/v8.0.1/onlyoffice-documentserver_amd64.deb"
|
||||||
# repo = "deb http://deb.debian.org/debian/ bullseye main contrib"
|
amd64.sha256 = "82b2e59ff7d3064a2d35614be7669bec88735f0837dac786762f7ba6a595cff3"
|
||||||
# key = "https://ftp-master.debian.org/keys/release-bullseye.asc"
|
arm64.url = "https://github.com/ONLYOFFICE/DocumentServer/releases/download/v8.0.1/onlyoffice-documentserver_arm64.deb"
|
||||||
# packages = ["ttf-mscorefonts-installer"]
|
arm64.sha256 = "3fe98049dc483b04f9deeaa935795c49ff6086649d7d51a4a8e67e2f1a7c6093"
|
||||||
|
rename = "onlyoffice-documentserver.deb"
|
||||||
# Manual install in scripts
|
autoupdate.asset.amd64 = "^onlyoffice-documentserver_amd64.deb$"
|
||||||
# [resources.apt.extras.onlyoffice]
|
autoupdate.asset.arm64 = "^onlyoffice-documentserver_arm64.deb$"
|
||||||
# repo = "https://download.onlyoffice.com/repo/debian squeeze main"
|
autoupdate.strategy = "latest_github_release"
|
||||||
# key = "https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE"
|
|
||||||
# packages = "onlyoffice-documentserver"
|
|
||||||
|
|
||||||
[resources.database]
|
[resources.database]
|
||||||
type = "postgresql"
|
type = "postgresql"
|
||||||
|
|
|
@ -32,15 +32,9 @@ _install_onlyoffice_deb() {
|
||||||
# the install/configure of their package, which is awful since that will
|
# the install/configure of their package, which is awful since that will
|
||||||
# restart NGINX and the whole webadmin and maybe even the YunoHost command
|
# restart NGINX and the whole webadmin and maybe even the YunoHost command
|
||||||
# running the install...
|
# running the install...
|
||||||
|
|
||||||
# Do not replace app dependencies
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
YNH_INSTALL_APP_DEPENDENCIES_REPLACE="false"
|
ynh_package_install $install_dir/onlyoffice-documentserver.deb
|
||||||
|
|
||||||
# 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"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -50,6 +50,22 @@ chmod 750 "$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R ds:ds "$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
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -7,6 +7,17 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
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
|
# REMOVE ONLYOFFICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -25,8 +36,6 @@ ynh_package_autopurge onlyoffice-documentserver
|
||||||
|
|
||||||
dpkg --configure -a
|
dpkg --configure -a
|
||||||
|
|
||||||
apt-key del "E09C A29F 6E17 8040 EF22 B409 8320 CA65 CB2D E8E5" 2>/dev/null
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE SYSTEM CONFIGURATIONS
|
# REMOVE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -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"
|
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
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -55,6 +55,22 @@ chmod 750 "$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R ds:ds "$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
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue