mirror of
https://github.com/YunoHost-Apps/guacamole_ynh.git
synced 2024-09-03 19:16:03 +02:00
Cleanup _common.sh, fix sources url
This commit is contained in:
parent
7fb86b9e38
commit
c6f8622096
2 changed files with 44 additions and 51 deletions
|
@ -49,40 +49,40 @@ ram.runtime = "50M"
|
|||
|
||||
[resources]
|
||||
[resources.sources]
|
||||
[resources.sources.auth-header]
|
||||
url = "https://downloads.apache.org/guacamole/1.5.4/binary/guacamole-auth-header-1.5.4.tar.gz"
|
||||
sha256 = "7a0adc0daa19ec69a0244f491222c62124b02f81f40aa91e9a94d06a2635d038"
|
||||
[resources.sources.server]
|
||||
url = "https://downloads.apache.org/guacamole/1.5.4/source/guacamole-server-1.5.4.tar.gz"
|
||||
sha256 = "4c0add552b1fc387c23a35c430155e01f2dfcf9daa0f96fbf805d0ace756729e"
|
||||
|
||||
[resources.sources.mariadb-java-client]
|
||||
url = "https://downloads.mariadb.com/Connectors/java/connector-java-2.7.4/mariadb-java-client-2.7.4.jar"
|
||||
sha256 = "f06577b19e89b33028b96cd4f031248e761de7ebc712f4ef535e268df76edb2a"
|
||||
format = "whatever"
|
||||
extract = false
|
||||
[resources.sources.client]
|
||||
url = "https://downloads.apache.org/guacamole/1.5.4/binary/guacamole-1.5.4.war"
|
||||
sha256 = "5728b563911bd64bce0a0b81c74ea8ccb2190d1785bff34030fc6885a8273d3e"
|
||||
format = "whatever"
|
||||
extract = false
|
||||
|
||||
[resources.sources.auth-ldap]
|
||||
url = "https://downloads.apache.org/guacamole/1.5.4/binary/guacamole-auth-ldap-1.5.4.tar.gz"
|
||||
sha256 = "f912fe921cd0d429a752709e31a37b931e95d88a47bc4007ab49377d1c1a6336"
|
||||
[resources.sources.auth-header]
|
||||
url = "https://downloads.apache.org/guacamole/1.5.4/binary/guacamole-auth-header-1.5.4.tar.gz"
|
||||
sha256 = "7a0adc0daa19ec69a0244f491222c62124b02f81f40aa91e9a94d06a2635d038"
|
||||
|
||||
[resources.sources.client]
|
||||
url = "https://downloads.apache.org/guacamole/1.5.4/binary/guacamole-1.5.4.war"
|
||||
sha256 = "5728b563911bd64bce0a0b81c74ea8ccb2190d1785bff34030fc6885a8273d3e"
|
||||
format = "whatever"
|
||||
extract = false
|
||||
[resources.sources.auth-ldap]
|
||||
url = "https://downloads.apache.org/guacamole/1.5.4/binary/guacamole-auth-ldap-1.5.4.tar.gz"
|
||||
sha256 = "f912fe921cd0d429a752709e31a37b931e95d88a47bc4007ab49377d1c1a6336"
|
||||
|
||||
[resources.sources.server]
|
||||
url = "https://downloads.apache.org/guacamole/1.5.4/source/guacamole-server-1.5.4.tar.gz"
|
||||
sha256 = "4c0add552b1fc387c23a35c430155e01f2dfcf9daa0f96fbf805d0ace756729e"
|
||||
[resources.sources.auth-jdbc]
|
||||
url = "https://downloads.apache.org/guacamole/1.5.4/binary/guacamole-auth-jdbc-1.5.4.tar.gz"
|
||||
sha256 = "f45736b28eb6647b7eb0d2b48331e12e5a432661f61115b63d1a05a5bd20244d"
|
||||
|
||||
[resources.sources.tomcat9_deb]
|
||||
url = "https://ftp.debian.org/debian/pool/main/t/tomcat9/libtomcat9-java_9.0.70-2_all.deb"
|
||||
sha256 = "537c290cf5499eb09323c14f096be6f2946bba8968c089d8c8c21952bc8768ff"
|
||||
format = "whatever"
|
||||
extract = false
|
||||
rename = "tomcat9.deb"
|
||||
[resources.sources.mariadb-java-client]
|
||||
url = "https://downloads.mariadb.com/Connectors/java/connector-java-2.7.4/mariadb-java-client-2.7.4.jar"
|
||||
sha256 = "f06577b19e89b33028b96cd4f031248e761de7ebc712f4ef535e268df76edb2a"
|
||||
format = "whatever"
|
||||
extract = false
|
||||
|
||||
[resources.sources.auth-jdbc]
|
||||
url = "https://downloads.apache.org/guacamole/1.5.4/binary/guacamole-auth-jdbc-1.5.4.tar.gz"
|
||||
sha256 = "f45736b28eb6647b7eb0d2b48331e12e5a432661f61115b63d1a05a5bd20244d"
|
||||
[resources.sources.tomcat9_deb]
|
||||
url = "https://ftp.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.43-2~deb11u9_all.deb"
|
||||
sha256 = "e016d55fd13bb51906106ede43fd970001f9b23db89628ddcbcca11e10a6068f"
|
||||
format = "whatever"
|
||||
extract = false
|
||||
rename = "tomcat9.deb"
|
||||
|
||||
[resources.ports]
|
||||
main.default = 8080
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
guacamole_version="1.5.4"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
function setup_sources {
|
||||
guacamole_version="1.5.4"
|
||||
|
||||
ynh_setup_source --source_id="server" --dest_dir="$install_dir/.guacd-src"
|
||||
|
||||
tomcat_guac_dir="$path"
|
||||
|
@ -20,34 +20,27 @@ function setup_sources {
|
|||
|
||||
ynh_setup_source --source_id="client" --dest_dir="$install_dir/var/lib/tomcat9/webapps/$tomcat_guac_dir"
|
||||
|
||||
ynh_setup_source --source_id="auth-ldap" --dest_dir="$install_dir/etc/guacamole/extensions/ldap"
|
||||
mv "$install_dir/etc/guacamole/extensions/ldap/guacamole-auth-ldap-$guacamole_version.jar" "$install_dir/etc/guacamole/extensions/guacamole-auth-ldap.jar"
|
||||
ynh_secure_remove --file="$install_dir/etc/guacamole/extensions/ldap"
|
||||
ynh_setup_source --source_id="auth-ldap" --dest_dir="$install_dir/downloads/auth-ldap"
|
||||
mv "$install_dir/downloads/auth-ldap/guacamole-auth-ldap-$guacamole_version.jar" "$install_dir/etc/guacamole/extensions/guacamole-auth-ldap.jar"
|
||||
|
||||
ynh_setup_source --source_id="auth-header" --dest_dir="$install_dir/etc/guacamole/extensions/header"
|
||||
mv "$install_dir/etc/guacamole/extensions/header/guacamole-auth-header-$guacamole_version.jar" "$install_dir/etc/guacamole/extensions/guacamole-auth-header.jar"
|
||||
ynh_secure_remove --file="$install_dir/etc/guacamole/extensions/header"
|
||||
ynh_setup_source --source_id="auth-header" --dest_dir="$install_dir/downloads/auth-header"
|
||||
mv "$install_dir/downloads/auth-header/guacamole-auth-header-$guacamole_version.jar" "$install_dir/etc/guacamole/extensions/guacamole-auth-header.jar"
|
||||
|
||||
ynh_setup_source --source_id="auth-jdbc" --dest_dir="$install_dir/etc/guacamole/extensions/jdbc"
|
||||
mv "$install_dir/etc/guacamole/extensions/jdbc/mysql/guacamole-auth-jdbc-mysql-$guacamole_version.jar" "$install_dir/etc/guacamole/extensions/guacamole-auth-jdbc-mysql.jar"
|
||||
mv "$install_dir/etc/guacamole/extensions/jdbc/mysql/schema" "$install_dir/etc/guacamole/extensions/mysql-schema"
|
||||
ynh_secure_remove --file="$install_dir/etc/guacamole/extensions/jdbc"
|
||||
ynh_setup_source --source_id="auth-jdbc" --dest_dir="$install_dir/downloads/auth-jdbc"
|
||||
mv "$install_dir/downloads/auth-jdbc/mysql/guacamole-auth-jdbc-mysql-$guacamole_version.jar" "$install_dir/etc/guacamole/extensions/guacamole-auth-jdbc-mysql.jar"
|
||||
mv "$install_dir/downloads/auth-jdbc/mysql/schema" "$install_dir/etc/guacamole/extensions/mysql-schema"
|
||||
|
||||
ynh_setup_source --source_id="mariadb-java-client" --dest_dir="$install_dir/etc/guacamole/lib/"
|
||||
|
||||
ynh_setup_source --source_id="tomcat9_deb" --dest_dir="$install_dir/"
|
||||
|
||||
pushd "$install_dir" || ynh_die
|
||||
ar x "$install_dir/tomcat9.deb" "data.tar.xz"
|
||||
ynh_setup_source --source_id="tomcat9_deb" --dest_dir="$install_dir/downloads/tomcat9"
|
||||
pushd "$install_dir/downloads/tomcat9" || ynh_die
|
||||
ar x "tomcat9.deb" "data.tar.xz"
|
||||
tar xJf data.tar.xz
|
||||
popd || ynh_die
|
||||
cp -r "$install_dir/downloads/tomcat9/usr/share/tomcat9/etc" -T "$install_dir/etc/tomcat9/"
|
||||
cp -r "$install_dir/downloads/tomcat9/etc/tomcat9/" -T "$install_dir/etc/tomcat9/"
|
||||
|
||||
ynh_secure_remove --file="$install_dir/tomcat9.deb"
|
||||
mkdir -p "$install_dir/tomcat9-data"
|
||||
tar -C "$install_dir/tomcat9-data" -xJf "$install_dir/data.tar.xz"
|
||||
cp -r "$install_dir/tomcat9-data/usr/share/tomcat9/etc" -T "$install_dir/etc/tomcat9/"
|
||||
cp -r "$install_dir/tomcat9-data/etc/tomcat9/" -T "$install_dir/etc/tomcat9/"
|
||||
ynh_secure_remove --file="$install_dir/data.tar.xz"
|
||||
ynh_secure_remove --file="$install_dir/tomcat9-data"
|
||||
ynh_secure_remove --file="$install_dir/downloads/"
|
||||
}
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue