From e162a21591f710233593bec4c773ceb053892216 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Wed, 6 Jul 2022 23:34:13 +0530 Subject: [PATCH] add basic instructions page --- scripts/install | 16 +++++++++ sources/extra_files/help/index.html | 50 +++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 sources/extra_files/help/index.html diff --git a/scripts/install b/scripts/install index c721dce..78b0e68 100755 --- a/scripts/install +++ b/scripts/install @@ -42,7 +42,9 @@ app=$YNH_APP_INSTANCE_NAME ynh_script_progression --message="Validating installation parameters..." --weight=1 final_path=/opt/yunohost/$app +final_path_www=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" +test ! -e "$final_path_www" || ynh_die --message="This path already contains a folder" # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -57,6 +59,8 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=language --value=$language ynh_app_setting_set --app=$app --key=network_name --value=$network_name ynh_app_setting_set --app=$app --key=server_name --value=$server_name +ynh_app_setting_set --app=$app --key=final_path_www --value=$final_path_www +ynh_app_setting_set --app=$app --key=final_path --value=$final_path #================================================= # STANDARD MODIFICATIONS @@ -109,6 +113,18 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" chmod +x "$final_path/ergo" +# Copy help file +mkdir -p "$final_path_www/help" +if test -e "$YNH_APP_BASEDIR/sources/extra_files/help"; then + cp --archive "$YNH_APP_BASEDIR/sources/extra_files/help/." "$final_path_www/help" +fi +ynh_replace_vars --file="$final_path_www/help/index.html" + +chmod 750 "$final_path_www" +chmod -R o-rwx "$final_path_www" +chown -R "www-data":"www-data" "$final_path_www" + + #================================================= # NGINX CONFIGURATION #================================================= diff --git a/sources/extra_files/help/index.html b/sources/extra_files/help/index.html new file mode 100644 index 0000000..eaf3dd1 --- /dev/null +++ b/sources/extra_files/help/index.html @@ -0,0 +1,50 @@ + + + + + Ergo Chat IRC Server + + + +

Ergo Chat IRC Server

+

To join __NETWORK_NAME__

+
+

+ IRC Instructions: +

+
    + Server Details: +
      +
    • __DOMAIN__ on __PORT__ / __SECURE_PORT__ (SSL) +
    +
+
+ +