From 9a55914b96f7147a1ec57a1d95e4c25521843a0b Mon Sep 17 00:00:00 2001 From: liberodark Date: Mon, 26 Nov 2018 14:17:50 +0100 Subject: [PATCH] add app source --- conf/app.src | 6 ++++++ scripts/install | 17 +++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 conf/app.src diff --git a/conf/app.src b/conf/app.src new file mode 100644 index 0000000..cd5aebf --- /dev/null +++ b/conf/app.src @@ -0,0 +1,6 @@ +SOURCE_URL=https://github.com/streamaserver/streama/releases/download/v1.6.0-RC9/streama-1.6.0-RC9.war +SOURCE_SUM=850fe2e4aed30eb3f83d77f1d9d8421ad0ab52f24ec7faaa07d4269cc440d4e4 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=war +SOURCE_IN_SUBDIR=false +SOURCE_FILENAME=streama-1.6.0-RC9.war \ No newline at end of file diff --git a/scripts/install b/scripts/install index 374bd54..7e3112b 100644 --- a/scripts/install +++ b/scripts/install @@ -47,7 +47,7 @@ app=$YNH_APP_INSTANCE_NAME ### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". ### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app" -final_path=/opt/yunohost/$app +final_path=/opt/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" # Normalize the url path syntax @@ -91,11 +91,20 @@ ynh_package_install openjdk-8-jre-headless # INSTALL STREAMA #============================================== -mkdir /opt/streama +#mkdir /opt/streama #mkdir /var/www/$path_url wget https://github.com/streamaserver/streama/releases/download/v1.6.0-RC9/streama-1.6.0-RC9.war -mv streama-1.6.0-RC9.war /opt/streama -chmod +x /opt/streama/streama-1.6.0-RC9.war +#mv streama-1.6.0-RC9.war /opt/streama +#chmod +x /opt/streama/streama-1.6.0-RC9.war + +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_app_setting_set $app final_path $final_path +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source "$final_path" +chmod +x $final_path/streama-1.6.0-RC9.war + #================================================= # NGINX CONFIGURATION