2021-03-19 04:09:26 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# COMMON VARIABLES
|
|
|
|
#=================================================
|
|
|
|
|
2024-02-24 12:51:25 +01:00
|
|
|
guacamole_version="1.5.4"
|
|
|
|
|
2021-03-19 04:09:26 +01:00
|
|
|
#=================================================
|
|
|
|
# PERSONAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
2022-01-06 21:04:45 +01:00
|
|
|
function setup_sources {
|
2023-05-29 17:10:43 +02:00
|
|
|
ynh_setup_source --source_id="server" --dest_dir="$install_dir/.guacd-src"
|
2022-01-06 21:04:45 +01:00
|
|
|
|
2023-05-29 17:10:43 +02:00
|
|
|
tomcat_guac_dir="$path"
|
|
|
|
if [ "$path" == "/" -o -z "$path" ]; then
|
2022-01-06 21:04:45 +01:00
|
|
|
tomcat_guac_dir="ROOT"
|
|
|
|
fi
|
|
|
|
|
2023-05-29 17:10:43 +02:00
|
|
|
ynh_setup_source --source_id="client" --dest_dir="$install_dir/var/lib/tomcat9/webapps/$tomcat_guac_dir"
|
2022-01-06 21:04:45 +01:00
|
|
|
|
2024-02-24 12:51:25 +01:00
|
|
|
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"
|
2022-01-06 21:04:45 +01:00
|
|
|
|
2024-02-24 12:51:25 +01:00
|
|
|
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"
|
2022-01-06 21:04:45 +01:00
|
|
|
|
2024-02-24 12:51:25 +01:00
|
|
|
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"
|
2022-01-06 21:04:45 +01:00
|
|
|
|
2023-05-29 17:10:43 +02:00
|
|
|
ynh_setup_source --source_id="mariadb-java-client" --dest_dir="$install_dir/etc/guacamole/lib/"
|
2022-01-06 21:04:45 +01:00
|
|
|
|
2024-02-24 12:51:25 +01:00
|
|
|
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
|
2022-01-06 21:04:45 +01:00
|
|
|
popd || ynh_die
|
2024-02-24 12:51:25 +01:00
|
|
|
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/"
|
2022-01-06 21:04:45 +01:00
|
|
|
|
2024-02-24 12:51:25 +01:00
|
|
|
ynh_secure_remove --file="$install_dir/downloads/"
|
2022-01-06 21:04:45 +01:00
|
|
|
}
|
|
|
|
|
2021-03-19 04:09:26 +01:00
|
|
|
#=================================================
|
|
|
|
# EXPERIMENTAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# FUTURE OFFICIAL HELPERS
|
|
|
|
#=================================================
|