From d468204e4fb2a83bae5fc9dfefe0fc6b2e3aecef Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 11 Oct 2020 16:19:53 +0200 Subject: [PATCH] Add src link --- conf/app.src | 6 ++++++ conf/config.json.example | 26 ++++++++++++++++++-------- scripts/install | 11 ++++++++++- scripts/restore | 2 +- scripts/upgrade | 2 +- 5 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 conf/app.src diff --git a/conf/app.src b/conf/app.src new file mode 100644 index 0000000..f53f889 --- /dev/null +++ b/conf/app.src @@ -0,0 +1,6 @@ +SOURCE_URL=https://github.com/kiwiirc/kiwiirc/releases/download/v1.5.0/kiwiirc_v1.5.0.zip +SOURCE_SUM=c7b31b2a92b173db4a3878d95aa74c8eb796e7b4d5600a80a00a73d80aa12ada +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=zip +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= diff --git a/conf/config.json.example b/conf/config.json.example index 663f70b..cbb6d92 100644 --- a/conf/config.json.example +++ b/conf/config.json.example @@ -1,21 +1,31 @@ { "windowTitle": "Kiwi IRC - The web IRC client", - "startupScreen": "customServer", - "kiwiServer": "http://example.com/webirc/kiwiirc/", + "startupScreen": "welcome", + "kiwiServer": "https://localdev.clients.kiwiirc.com/webirc/kiwiirc/", "restricted": false, - "theme": "default", + "theme": "Default", "themes": [ - { "name": "Default", "url": "static/themes/default.css" } + { "name": "Default", "url": "static/themes/default" }, + { "name": "Dark", "url": "static/themes/dark" }, + { "name": "Coffee", "url": "static/themes/coffee" }, + { "name": "GrayFox", "url": "static/themes/grayfox" }, + { "name": "Nightswatch", "url": "static/themes/nightswatch" }, + { "name": "Osprey", "url": "static/themes/osprey" }, + { "name": "Radioactive", "url": "static/themes/radioactive" }, + { "name": "Sky", "url": "static/themes/sky" }, + { "name": "Elite", "url": "static/themes/elite" } ], "startupOptions" : { - "server": "irc.freenode.net", + "server": "chat.freenode.net", "port": 6697, "tls": true, - "channel": "", + "channel": "#yunohost", "nick": "" }, "embedly": { "key": "" }, - "plugins": [] -} \ No newline at end of file + "plugins": [ + { "name": "customise", "url": "static/plugins/customise.html" } + ] +} diff --git a/scripts/install b/scripts/install index 0fdeae7..a4f4d55 100644 --- a/scripts/install +++ b/scripts/install @@ -49,6 +49,15 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=is_public --value=$is_public +#================================================= +# FIND AND OPEN A PORT +#================================================= +ynh_script_progression --message="Configuring firewall..." --time --weight=1 + +# Find an available port +port=$(ynh_find_port --port=8095) +ynh_app_setting_set --app=$app --key=port --value=$port + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -56,7 +65,7 @@ ynh_script_progression --message="Setting up source files..." --weight=2 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -mv ../sources/dist "$final_path" +ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 0ad1818..f36582a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -65,7 +65,7 @@ ynh_system_user_create --username=$app #================================================= # RESTORE USER RIGHTS #================================================= -ynh_script_progression --message="Restoring user rights..." +ynh_script_progression --message="Restoring user rights..." --weight=1 # Restore permissions on app files chown -R $app:$app $final_path diff --git a/scripts/upgrade b/scripts/upgrade index d474a22..63453f1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,7 +89,7 @@ ynh_system_user_create --username=$app #================================================= # SECURE FILES AND DIRECTORIES #================================================= -ynh_script_progression --message="Securing files and directories..." +ynh_script_progression --message="Securing files and directories..." --weight=1 # Set permissions on app files chown -R $app:$app $final_path