From 87354ed95f4a3a94690e39191e8d5a49dc03fc20 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 29 Jul 2022 00:43:33 +0200 Subject: [PATCH 1/5] Apply example_ynh --- .github/workflows/updater.sh | 141 ++++++++++++++++++++++++++ .github/workflows/updater.yml | 49 +++++++++ conf/{arm-7.src => arm7.src} | 0 conf/config.yml | 6 +- conf/nginx.conf | 41 +++----- doc/.gitkeep | 0 doc/DESCRIPTION.md | 1 + doc/DESCRIPTION_fr.md | 1 + doc/DISCLAIMER.md | 4 + doc/DISCLAIMER_fr.md | 4 + doc/screenshots/.gitkeep | 0 doc/screenshots/ui.png | Bin 0 -> 32745 bytes manifest.json | 30 ++---- scripts/_common.sh | 11 -- scripts/backup | 20 ++-- scripts/change_url | 26 ++--- scripts/install | 163 +++++++++++++++--------------- scripts/remove | 27 ++--- scripts/restore | 100 ++++++++++--------- scripts/upgrade | 183 ++++++++++++++++------------------ 20 files changed, 487 insertions(+), 320 deletions(-) create mode 100644 .github/workflows/updater.sh create mode 100644 .github/workflows/updater.yml rename conf/{arm-7.src => arm7.src} (100%) create mode 100644 doc/.gitkeep create mode 100644 doc/DESCRIPTION.md create mode 100644 doc/DESCRIPTION_fr.md create mode 100644 doc/DISCLAIMER.md create mode 100644 doc/DISCLAIMER_fr.md create mode 100644 doc/screenshots/.gitkeep create mode 100644 doc/screenshots/ui.png diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh new file mode 100644 index 0000000..72888b0 --- /dev/null +++ b/.github/workflows/updater.sh @@ -0,0 +1,141 @@ +#!/bin/bash + +#================================================= +# PACKAGE UPDATING HELPER +#================================================= + +# This script is meant to be run by GitHub Actions +# The YunoHost-Apps organisation offers a template Action to run this script periodically +# Since each app is different, maintainers can adapt its contents so as to perform +# automatic actions when a new upstream release is detected. + +#================================================= +# FETCHING LATEST RELEASE AND ITS ASSETS +#================================================= + +# Fetching information +current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') +repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') +# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) +version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) +assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) + +# Later down the script, we assume the version has only digits and dots +# Sometimes the release name starts with a "v", so let's filter it out. +# You may need more tweaks here if the upstream repository has different naming conventions. +if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then + version=${version:1} +fi + +# Setting up the environment variables +echo "Current version: $current_version" +echo "Latest release from upstream: $version" +echo "VERSION=$version" >> $GITHUB_ENV +echo "REPO=$repo" >> $GITHUB_ENV +# For the time being, let's assume the script will fail +echo "PROCEED=false" >> $GITHUB_ENV + +# Proceed only if the retrieved version is greater than the current one +if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then + echo "::warning ::No new version available" + exit 0 +# Proceed only if a PR for this new version does not already exist +elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then + echo "::warning ::A branch already exists for this update" + exit 0 +fi + +# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) +echo "${#assets[@]} available asset(s)" + +#================================================= +# UPDATE SOURCE FILES +#================================================= + +# Here we use the $assets variable to get the resources published in the upstream release. +# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. + +# Let's loop over the array of assets URLs +for asset_url in ${assets[@]}; do + + echo "Handling asset at $asset_url" + + # Assign the asset to a source file in conf/ directory + # Here we base the source file name upon a unique keyword in the assets url (admin vs. update) + # Leave $src empty to ignore the asset + case $asset_url in + *"linux-386"*) + src="i386" + ;; + *"linux-amd64"*) + src="amd64" + ;; + *"linux-arm-7"*) + src="arm7" + ;; + *"linux-arm64"*) + src="arm64" + ;; + *) + src="" + ;; + esac + + # If $src is not empty, let's process the asset + if [ ! -z "$src" ]; then + + # Create the temporary directory + tempdir="$(mktemp -d)" + + # Download sources and calculate checksum + filename=${asset_url##*/} + curl --silent -4 -L $asset_url -o "$tempdir/$filename" + checksum=$(sha256sum "$tempdir/$filename" | head -c 64) + + # Delete temporary directory + rm -rf $tempdir + + # Get extension + if [[ $filename == *.tar.gz ]]; then + extension=tar.gz + else + extension=${filename##*.} + fi + + # Rewrite source file + cat < conf/$src.src +SOURCE_URL=$asset_url +SOURCE_SUM=$checksum +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=$extension +SOURCE_IN_SUBDIR=false +SOURCE_FILENAME= +SOURCE_EXTRACT=true +EOT + echo "... conf/$src.src updated" + + else + echo "... asset ignored" + fi + +done + +#================================================= +# SPECIFIC UPDATE STEPS +#================================================= + +# Any action on the app's source code can be done. +# The GitHub Action workflow takes care of committing all changes after this script ends. + +#================================================= +# GENERIC FINALIZATION +#================================================= + +# Replace new version in manifest +echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json + +# No need to update the README, yunohost-bot takes care of it + +# The Action will proceed only if the PROCEED environment variable is set to true +echo "PROCEED=true" >> $GITHUB_ENV +exit 0 diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml new file mode 100644 index 0000000..fb72ba0 --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,49 @@ +# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected. +# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization. +# This file should be enough by itself, but feel free to tune it to your needs. +# It calls updater.sh, which is where you should put the app-specific update steps. +name: Check for new upstream releases +on: + # Allow to manually trigger the workflow + workflow_dispatch: + # Run it every day at 6:00 UTC + schedule: + - cron: '0 6 * * *' +jobs: + updater: + runs-on: ubuntu-latest + steps: + - name: Fetch the source code + uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Run the updater script + id: run_updater + run: | + # Setting up Git user + git config --global user.name 'yunohost-bot' + git config --global user.email 'yunohost-bot@users.noreply.github.com' + # Run the updater script + /bin/bash .github/workflows/updater.sh + - name: Commit changes + id: commit + if: ${{ env.PROCEED == 'true' }} + run: | + git commit -am "Upgrade to v$VERSION" + - name: Create Pull Request + id: cpr + if: ${{ env.PROCEED == 'true' }} + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Update to version ${{ env.VERSION }} + committer: 'yunohost-bot ' + author: 'yunohost-bot ' + signoff: false + base: testing + branch: ci-auto-update-v${{ env.VERSION }} + delete-branch: true + title: 'Upgrade to version ${{ env.VERSION }}' + body: | + Upgrade to v${{ env.VERSION }} + draft: false diff --git a/conf/arm-7.src b/conf/arm7.src similarity index 100% rename from conf/arm-7.src rename to conf/arm7.src diff --git a/conf/config.yml b/conf/config.yml index b742dce..babe9b0 100644 --- a/conf/config.yml +++ b/conf/config.yml @@ -12,11 +12,11 @@ server: database: # for database see (configure database section) dialect: mysql - connection: __APP__:__DBPASS__@unix(/var/run/mysqld/mysqld.sock)/__DBNAME__?charset=utf8&parseTime=True&loc=Local + connection: __DB_USER__:__DB_PWD__@unix(/var/run/mysqld/mysqld.sock)/__DB_NAME__?charset=utf8&parseTime=True&loc=Local defaultuser: # on database creation, gotify creates an admin user - name: __ADMINUSER__ # the username of the default user - pass: __ADMINPASS__ # the password of the default user + name: __ADMIN__ # the username of the default user + pass: __PASSWORD__ # the password of the default user passstrength: 12 # the bcrypt password strength (higher = better but also slower) uploadedimagesdir: data/images # the directory for storing uploaded images pluginsdir: data/plugins # the directory where plugin resides diff --git a/conf/nginx.conf b/conf/nginx.conf index 4963313..e8585ff 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,33 +1,24 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/stream { - proxy_pass http://127.0.0.1:__PORT__/stream; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_pass http://127.0.0.1:__PORT__/stream; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; - proxy_connect_timeout 7m; - proxy_send_timeout 7m; - proxy_read_timeout 7m; - - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } + proxy_connect_timeout 7m; + proxy_send_timeout 7m; + proxy_read_timeout 7m; } location __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__/; - #sub_path_only rewrite ^/__PATH__(/.*) $1 break; - proxy_set_header Host $host; - proxy_buffering off; - fastcgi_param REMOTE_USER $remote_user; - client_max_body_size 50M; - more_set_input_headers 'Authorization: $http_authorization'; - proxy_set_header Authorization $http_authorization; - - # Force https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } + proxy_pass http://127.0.0.1:__PORT__/; + #sub_path_only rewrite ^/__PATH__(/.*) $1 break; + proxy_set_header Host $host; + proxy_buffering off; + fastcgi_param REMOTE_USER $remote_user; + client_max_body_size 50M; + more_set_input_headers 'Authorization: $http_authorization'; + proxy_set_header Authorization $http_authorization; } diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..052f6b8 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Gotify is a simple server for sending and receiving messages in real-time per web socket. (Includes a sleek web-ui) diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..5759a6a --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +Gotify est un serveur simple permettant d'envoyer et de recevoir des messages via websocket. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..c6d5587 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,4 @@ +## Configuration + +How to configure this app: +> Edit `config.yml` file via SSH. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..87a3a71 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,4 @@ +## Configuration + +Pour configurer Gotify : +> Éditer le fichier `config.yml` avec SSH. diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/ui.png b/doc/screenshots/ui.png new file mode 100644 index 0000000000000000000000000000000000000000..b28f6bbb72560a9da8c596a28c56ed1a19f49bd7 GIT binary patch literal 32745 zcmd42XH-*L+cwJHsHij*5d|Tl6af(d0ck-6q=R(nYADjB*AOd6jdbZq5s(t;B@`7Q z^xjJXgdRG9KtjT|qI*Bjc+Ysp8Q+id<4ndNGi%K?=Unsd*L^4Sv9=21S@yFuG&GEA zs!Dn^G_;j8G=D9h{u{V*rNZht@NvTKfz|^Wno>CZ(X*4l_iGSUJuMmFd-Yg&O-5?NZ*G3#f&Sq#PT0p{O{LHxaggKTOaE3f7&vH;Xe&8dg?!oc$xM;4I1(K zKMmaa{oi&U1o_YW|DR32;cIOncib$z{c9ybA1w!4-4Rw7$Q>=Lo}mw>ZlZttV6aEu z@8puqRoH~z*^I&fA5ANR?KxB2zK@PGj4%}LSUkvPIO8#3h3e#p62O#;xZd;D!MiQA z!f&TFeZdRmO1XwvSxixO((v27(Ru|NMYuQ-xOr|I+Np?z$;fTRH|+OodET|uQFtKh zOa?h0L`-|!pa|^u&4w2@C5KSZ_ecU&8S-Pwy+&yVb35(&&t>~&4xvqMs!Mw z%0?|lg5uY`5;M$Ah7(COV#p1?+&Ich@=$0vUEwOkPo6lLgXFKRlRzl#?N!U;oA-0#h?BQ_ zTK3EBTgON9gt&o4j-JXDei^rD`XvE*m@3)Mds>Uwys&oAu?89C<Jcg!eaA&c@uqqympKm@SqbM)@M=^X8!J1 zzCE^b(vo>M1gGL{_^1{1di2}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t?mF*m?N1#Htf5n+g2u#`L@RpR~UA7v?c!yMEO^j}bl7r?37`0bJK%y}1K# zTbmx2ST{#KQ{F>fy;i)R(1L}HWP}PYk2)eDUMWD(K3|PdS%})VbcM z8d*X~&`iORb(AX7uZOe5y%`uL+M>08|1{EtZ~FSeV6?QxiaJ2V&=^Ty!jeehWPwsi zNOT?gyIg2CAWv#+c+Yc2X+LEMziw-y#@4Id7B(!|uwAims_mXB?TgPi| zVF7x?Y7wCX-n9#_hMZidaCgaoyqyc_@4B;FfE;LWq|d1LzP<%1Xcnft498$!mp&-i z%e)M)W7gL<{9UBgEOA^AVa3bEPK%%|B!235>*%6s$;0i7*Imi{8=>uqM!!%%399wZ zk#7Wi4YFkX{t|=sT8A%lG3~#TrQ6U3hYoEKRVkB2#W!%_XLzi}_Jt{to=7$psgB`R z>E87vityfbZNuObOaNIwS)r2S5bjr~JcF1#dsyEdhF|CM)|otmv`d zjpFH+B?+gk#(Zd?8=2)W?#1!^9ojU$gv}x5qluS^Eke{?5N}MNXsLzD3uL$5Trzy@ zhTo{BL=1h4+K(ZS-np}*UEX9o-VnN1Z9gI&K+9v51c!mDt5Q?*cgI5Wgu-jGM&7aC z3Z@le=FX$(V|b?gV+HOHKvkKRrc>WI(Mk;J@6!|ixzT3idY5knx?P)_5Wx^+KN`^S z82gF@L(P`)1S3%?Qb*s@#qPATh2jt1!gSeGR`SxN4+%4Kmt_g!K7L&OU10`Fre=77 z)G*m2({us1XUCJrpX=uy{^-E46K_aPMG=S>dx|h ze?=q$sXaxe;$#*?kGQzOmT*SFgeL+JDD0enF*UXn880JyxcrO9Nat{ zyxbZ*+``xRg?V_`xVeS7xv>M|zz+QnC)n7UTAI86_b1Hx>J`EXByuv!(%F)KJ^o)w C7TF#E literal 0 HcmV?d00001 diff --git a/manifest.json b/manifest.json index bd6309f..d1355c2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,15 +6,21 @@ "en": "A simple server for sending and receiving messages.", "fr": "Un simple serveur pour envoyer et recevoir des messages." }, - "version": "2.1.4~ynh1", + "version": "2.1.4~ynh2", "url": "http://gotify.net", + "upstream": { + "license": "MIT", + "website": "http://gotify.net", + "admindoc": "https://gotify.net/docs/index", + "code": "https://github.com/gotify/server" + }, "license": "MIT", "maintainer": { "name": "plopoyop", "email": "plopoyop@gmail.com" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -22,34 +28,20 @@ "mysql" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", - "type": "domain", - "ask": { - "en": "Choose a domain name for gotify", - "fr": "Choisissez un nom de domaine pour gotify" - }, - "example": "example.com" + "type": "domain" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Gotify", - "fr": "Choisissez un chemin pour Gotify" - }, "example": "/gotify", "default": "/gotify" }, { "name": "admin", - "type": "user", - "ask": { - "en": "Choose an admin user", - "fr": "Choisissez l’administrateur" - }, - "example": "johndoe" + "type": "user" }, { "name": "password", diff --git a/scripts/_common.sh b/scripts/_common.sh index 8c4da07..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -15,14 +15,3 @@ #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm64" -elif [ -n "$(uname -m | grep 64)" ]; then - architecture="amd64" -elif [ -n "$(uname -m | grep arm)" ]; then - architecture="arm-7" -else - ynh_die "Unable to detect your achitecture, please open a bug describing \ - your hardware and the result of the command \"uname -m\"." 1 -fi \ No newline at end of file diff --git a/scripts/backup b/scripts/backup index 9f59389..6098c7a 100755 --- a/scripts/backup +++ b/scripts/backup @@ -6,6 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -13,6 +14,7 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +# Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= @@ -22,9 +24,9 @@ ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get $app final_path) -domain=$(ynh_app_setting_get $app domain) -db_name=$(ynh_app_setting_get $app db_name) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) +db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -43,6 +45,12 @@ ynh_backup --src_path="$final_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# BACKUP SYSTEMD +#================================================= + +ynh_backup --src_path="/etc/systemd/system/$app.service" + #================================================= # BACKUP THE MYSQL DATABASE #================================================= @@ -50,12 +58,6 @@ ynh_print_info --message="Backing up the MySQL database..." ynh_mysql_dump_db --database="$db_name" > db.sql -#================================================= -# BACKUP SYSTEMD -#================================================= - -ynh_backup --src_path="/etc/systemd/system/$app.service" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/change_url b/scripts/change_url index 2378050..4fb219d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -24,19 +24,23 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 +# Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) -port=$(ynh_app_setting_get $app port) + +# Add settings here as needed by your application +port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1 +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" @@ -67,14 +71,14 @@ fi #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 +ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -100,24 +104,20 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= -#================================================= - #================================================= # GENERIC FINALISATION #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 +ynh_script_progression --message="Starting a systemd service..." --weight=1 +# Start a systemd service ynh_systemd_action --service_name=$app --action="start" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload @@ -125,4 +125,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --time --last \ No newline at end of file +ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index b016ecb..172afd8 100755 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,9 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ynh_clean_check_starting +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -23,7 +26,6 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN -is_public=1 password=$YNH_APP_ARG_PASSWORD app=$YNH_APP_INSTANCE_NAME @@ -34,63 +36,31 @@ app=$YNH_APP_INSTANCE_NAME ynh_script_progression --message="Validating installation parameters..." final_path=/opt/yunohost/$app -test ! -e "$final_path" || ynh_die "This path already contains a folder" +test ! -e "$final_path" || ynh_die --message="This path already contains a folder" -# Normalize the url path syntax -path_url=$(ynh_normalize_url_path $path_url) - -# Check web path availability -ynh_webpath_available $domain $path_url # Register (book) web path -ynh_webpath_register $app $domain $path_url +ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= ynh_script_progression --message="Storing installation settings..." -ynh_app_setting_set $app domain $domain -ynh_app_setting_set $app path $path_url -ynh_app_setting_set $app admin $admin -ynh_app_setting_set $app is_public $is_public -ynh_app_setting_set $app password $password +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=admin --value=$admin +ynh_app_setting_set --app=$app --key=password --value=$password #================================================= # STANDARD MODIFICATIONS #================================================= # FIND AND OPEN A PORT #================================================= +ynh_script_progression --message="Finding an available port..." -# Find a free port -port=$(ynh_find_port 8080) -# Open this port -ynh_app_setting_set $app port $port - -#================================================= -# CREATE A MYSQL DATABASE -#================================================= -ynh_script_progression --message="Creating a MySQL database..." --weight=10 - -db_name=$(ynh_sanitize_dbid $app) -ynh_app_setting_set $app db_name $db_name -ynh_mysql_setup_db $db_name $db_name - -#================================================= -# DOWNLOAD, CHECK AND UNPACK SOURCE -#================================================= -ynh_script_progression --message="Setting up source files..." --weight=6 - -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" $architecture - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 - -# Create a dedicated nginx config -ynh_add_nginx_config +# Find an available port +port=$(ynh_find_port --port=8080) +ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # CREATE DEDICATED USER @@ -98,70 +68,97 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring system user..." --weight=2 # Create a system user -ynh_system_user_create $app +ynh_system_user_create --username=$app --home_dir="$final_path" + +#================================================= +# CREATE A MYSQL DATABASE +#================================================= +ynh_script_progression --message="Creating a MySQL database..." --weight=10 + +db_name=$(ynh_sanitize_dbid --db_name=$app) +db_user=$db_name +ynh_app_setting_set --app=$app --key=db_name --value=$db_name +ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name + +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_script_progression --message="Setting up source files..." --weight=6 + +ynh_app_setting_set --app=$app --key=final_path --value=$final_path +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH" + +mkdir -p $final_path/data + +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 + +# Create a dedicated NGINX config +ynh_add_nginx_config + +#================================================= +# SPECIFIC SETUP +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template="../conf/config.yml" --destination="$final_path/config.yml" + +chmod 400 "$final_path/config.yml" +chown $app:$app "$final_path/config.yml" #================================================= # SETUP SYSTEMD #================================================= +ynh_script_progression --message="Configuring a systemd service..." # Create a dedicated systemd config -ynh_replace_string "__ARCHITECTURE__" $architecture "../conf/systemd.service" +architecture=$YNH_ARCH ynh_add_systemd_config -#================================================= -# MODIFY A CONFIG FILE -#================================================= -ynh_script_progression --message="Create config file..." --weight=1 - -cp ../conf/config.yml "$final_path/config.yml" -ynh_replace_string "__APP__" $app "$final_path/config.yml" -ynh_replace_string "__PORT__" $port "$final_path/config.yml" -ynh_replace_string "__DBNAME__" $db_name "$final_path/config.yml" -ynh_replace_string "__DBPASS__" $db_pwd "$final_path/config.yml" -ynh_replace_string "__ADMINUSER__" $admin "$final_path/config.yml" -ynh_replace_string "__ADMINPASS__" $password "$final_path/config.yml" -ynh_replace_string "__DOMAIN__" $domain "$final_path/config.yml" - -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= - -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum "$final_path/config.yml" - #================================================= # GENERIC FINALIZATION #================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chown -R root:$app $final_path -mkdir -p $final_path/data -chown -R $app: $final_path/data/ -chmod o-rwx $final_path/ -R - -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# INTEGRATE SERVICE IN YUNOHOST #================================================= +ynh_script_progression --message="Integrating service in YunoHost..." yunohost service add $app +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." + +# Start a systemd service +ynh_systemd_action --service_name=$app --action="start" + #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 -# Make app public if necessary -ynh_permission_update --permission "main" --add visitors +# Everyone can access the app. +# The "main" permission is automatically created before the install script. +ynh_permission_update --permission="main" --add="visitors" #================================================= # RELOAD NGINX #================================================= ynh_script_progression --message="Reloading NGINX web server..." --weight=1 -systemctl reload nginx +ynh_systemd_action --service_name=nginx --action=reload + +#================================================= +# END OF SCRIPT +#================================================= -systemctl start $app ynh_script_progression --message="Installation of $app completed" --last -ynh_print_warn "Change the admin password after the first login or delete it in the config file (stored in plain text)" diff --git a/scripts/remove b/scripts/remove index 71a1cb5..f5feef2 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,43 +12,44 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings..." --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get $app domain) -port=$(ynh_app_setting_get $app port) -db_name=$(ynh_app_setting_get $app db_name) -db_user=$app -final_path=$(ynh_app_setting_get $app final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) +port=$(ynh_app_setting_get --app=$app --key=port) +db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name +final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # STANDARD REMOVE #================================================= -# REMOVE SERVICE FROM ADMIN PANEL +# REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -if yunohost service status | grep -q $app +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) +if ynh_exec_warn_less yunohost service status $app >/dev/null then - ynh_script_progression --message="Remove $app service" --weight=1 + ynh_script_progression --message="Removing $app service integration..." yunohost service remove $app fi #================================================= # STOP AND REMOVE SERVICE #================================================= +ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config - #================================================= # REMOVE THE MYSQL DATABASE #================================================= ynh_script_progression --message="Removing the MySQL database..." --weight=6 # Remove a database if it exists, along with the associated user -ynh_mysql_remove_db $db_user $db_name +ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name #================================================= # REMOVE APP MAIN DIR @@ -56,14 +57,14 @@ ynh_mysql_remove_db $db_user $db_name ynh_script_progression --message="Removing app main directory..." --weight=10 # Remove the app directory securely -ynh_secure_remove "$final_path" +ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2 -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index b60a9e4..2b92272 100755 --- a/scripts/restore +++ b/scripts/restore @@ -6,6 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -13,97 +14,104 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ynh_clean_check_starting +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings.." +ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get $app domain) -path_url=$(ynh_app_setting_get $app path) -final_path=$(ynh_app_setting_get $app final_path) -db_name=$(ynh_app_setting_get $app db_name) +domain=$(ynh_app_setting_get --app=$app --key=domain) +path_url=$(ynh_app_setting_get --app=$app --key=path) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) +db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters.." --weight=1 +ynh_script_progression --message="Validating restoration parameters..." --weight=1 -ynh_webpath_available $domain $path_url \ - || ynh_die "Path not available: ${domain}${path_url}" test ! -d $final_path \ - || ynh_die "There is already a directory: $final_path " + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS #================================================= -# RESTORE THE NGINX CONFIGURATION +# RECREATE THE DEDICATED USER #================================================= -ynh_script_progression --message="Restoring NGINX configuration..." --weight=1 +ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 -ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory.." --weight=1 +ynh_script_progression --message="Restoring the app main directory..." --weight=1 -ynh_restore_file "$final_path" +ynh_restore_file --origin_path="$final_path" -#================================================= -# RESTORE THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Restoring the MySQL database.." --weight=20 - -db_pwd=$(ynh_app_setting_get $app mysqlpwd) -ynh_mysql_setup_db $db_name $db_name $db_pwd -ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql - -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user.." --weight=1 - -# Create the dedicated user (if not existing) -ynh_system_user_create $app - -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Restore permissions on app files -chown -R root:$app $final_path -mkdir -p $final_path/data -chown -R $app: $final_path/data/ -chmod o-rwx $final_path/ -R +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # SPECIFIC RESTORATION #================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# RESTORE THE NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 -yunohost service add $app +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + +#================================================= +# RESTORE THE MYSQL DATABASE +#================================================= +ynh_script_progression --message="Restoring the MySQL database..." --weight=20 + +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= # RESTORE SYSTEMD #================================================= -ynh_script_progression --message="Restoring service..." --weight=10 +ynh_script_progression --message="Restoring the systemd configuration..." -ynh_restore_file "/etc/systemd/system/$app.service" +ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -systemctl start $app + +#================================================= +# SPECIFIC RESTORATION +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." + +yunohost service add $app + +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." + +ynh_systemd_action --service_name=$app --action="start" #================================================= # GENERIC FINALIZATION #================================================= +# RELOAD NGINX AND PHP-FPM +#================================================= ynh_script_progression --message="Reloading NGINX web server..." --weight=1 -systemctl reload nginx +ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 28df7fd..4885da2 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,24 +12,55 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings.." --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get $app domain) -path_url=$(ynh_app_setting_get $app path) -admin=$(ynh_app_setting_get $app admin) -is_public=$(ynh_app_setting_get $app is_public) -final_path=$(ynh_app_setting_get $app final_path) -db_name=$(ynh_app_setting_get $app db_name) -db_pwd=$(ynh_app_setting_get $app mysqlpwd) -port=$(ynh_app_setting_get $app port) -password=$(ynh_app_setting_get $app password) +domain=$(ynh_app_setting_get --app=$app --key=domain) +path_url=$(ynh_app_setting_get --app=$app --key=path) +admin=$(ynh_app_setting_get --app=$app --key=admin) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) +db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +port=$(ynh_app_setting_get --app=$app --key=port) +password=$(ynh_app_setting_get --app=$app --key=password) + +#================================================= +# CHECK VERSION +#================================================= +ynh_script_progression --message="Checking version..." + +upgrade_type=$(ynh_check_app_version_changed) + +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + ynh_clean_check_starting + # Restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# STANDARD UPGRADE STEPS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." + +ynh_systemd_action --service_name=$app --action="stop" #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility.." --weight=1 +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # Fix is_public as a boolean value if [ "$is_public" = "Yes" ]; then @@ -52,49 +83,13 @@ if [ -z $final_path ]; then ynh_app_setting_set $app final_path $final_path fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=30 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -path_url=$(ynh_normalize_url_path $path_url) - -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# DOWNLOAD, CHECK AND UNPACK SOURCE -#================================================= -ynh_script_progression --message="Upgrading source files..." --weight=6 - -# Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source "$final_path" $architecture - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 - -# Create a dedicated NGINX config -if [ "$path_url" != "/" ] -then - ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf" +# If data directory doesn't exists +if [ -z $final_path/data ]; then + mkdir $final_path/data fi -ynh_add_nginx_config +# check data directory permission +chown -R $app: $final_path/data #================================================= # CREATE DEDICATED USER @@ -104,75 +99,67 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create $app +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_script_progression --message="Upgrading source files..." --weight=6 + +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + ynh_script_progression --message="Upgrading source files..." + + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH" +fi + +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # SPECIFIC UPGRADE #================================================= +# UPDATE A CONFIG FILE +#================================================= +ynh_script_progression --message="Updating a configuration file..." -ynh_backup_if_checksum_is_different "$final_path/config.yml" +ynh_add_config --template="../conf/config.yml" --destination="$final_path/config.yml" -cp ../conf/config.yml "$final_path/config.yml" -ynh_replace_string "__APP__" $app "$final_path/config.yml" -ynh_replace_string "__PORT__" $port "$final_path/config.yml" -ynh_replace_string "__DBNAME__" $db_name "$final_path/config.yml" -ynh_replace_string "__DBPASS__" $db_pwd "$final_path/config.yml" -ynh_replace_string "__ADMINUSER__" $admin "$final_path/config.yml" -ynh_replace_string "__ADMINPASS__" $password "$final_path/config.yml" -ynh_replace_string "__DOMAIN__" $domain "$final_path/config.yml" - -# Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum "$final_path/config.yml" +chmod 400 "$final_path/config.yml" +chown $app:$app "$final_path/config.yml" #================================================= # SETUP SYSTEMD #================================================= +ynh_script_progression --message="Upgrading systemd configuration..." # Create a dedicated systemd config -ynh_replace_string "__ARCHITECTURE__" $architecture "../conf/systemd.service" +architecture=$YNH_ARCH ynh_add_systemd_config #================================================= # GENERIC FINALIZATION #================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions on app files -chown -R root:$app $final_path/ -chown -R $app: $final_path/data/ -chmod o-rwx $final_path/ -R - -# If data directory doesn't exists -if [ -z $final_path/data ]; then - mkdir $final_path/data -fi - -# check data directory permission -chown -R $app: $final_path/data - -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# INTEGRATE SERVICE IN YUNOHOST #================================================= +ynh_script_progression --message="Integrating service in YunoHost..." yunohost service add $app #================================================= -# SETUP SSOWAT +# START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Starting a systemd service..." -unprotected_uris=$(ynh_app_setting_get --app=$app --key=unprotected_uris) -if [ ! -z "$unprotected_uris" ]; then - ynh_app_setting_delete --app=$app --key=unprotected_uris -fi - -ynh_permission_update --permission "main" --add visitors - -#================================================= -# RELOAD SERVICE -#================================================= -ynh_script_progression --message="Reloading service..." --weight=1 - -systemctl restart $app +ynh_systemd_action --service_name=$app --action="start" #================================================= # RELOAD NGINX From 90e17d3ae4cb75de4af405a5b8d4ada57b2efcab Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 28 Jul 2022 22:43:38 +0000 Subject: [PATCH 2/5] Auto-update README --- README.md | 52 +++++++++++++++++++++++++++------------------------- README_fr.md | 46 ++++++++++++++++++++++++---------------------- 2 files changed, 51 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 6b72f21..c07a60b 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,54 @@ + + # Gotify for YunoHost -[![Integration level](https://dash.yunohost.org/integration/gotify.svg)](https://dash.yunohost.org/appci/app/gotify) ![](https://ci-apps.yunohost.org/ci/badges/gotify.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/gotify.maintain.svg) -[![Install Gotify with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=gotify) +[![Integration level](https://dash.yunohost.org/integration/gotify.svg)](https://dash.yunohost.org/appci/app/gotify) ![Working status](https://ci-apps.yunohost.org/ci/badges/gotify.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/gotify.maintain.svg) +[![Install Gotify with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotify) *[Lire ce readme en français.](./README_fr.md)* -> *This package allow you to install Gotify quickly and simply on a YunoHost server. -If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* +> *This package allows you to install Gotify quickly and simply on a YunoHost server. +If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview + Gotify is a simple server for sending and receiving messages in real-time per web socket. (Includes a sleek web-ui) -**Shipped version:** 2.1.4 + +**Shipped version:** 2.1.4~ynh2 ## Screenshots -[![Screenshot](https://raw.githubusercontent.com/gotify/server/master/ui.png)](https://github.com/gotify/server) +![Screenshot of Gotify](./doc/screenshots/ui.png) + +## Disclaimers / important information ## Configuration How to configure this app: > Edit `config.yml` file via SSH. -## Documentation +## Documentation and resources - * Official documentation: https://gotify.net/docs/index - * YunoHost documentation: https://yunohost.org/#/app_gotify +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: -#### Multi-users support +## Developer info -LDAP is not supported (blocked until Gotify core upstream implements it). - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/gotify_ynh/issues - * App website: https://gotify.net/ - * Upstream app repository: https://github.com/gotify/server - * YunoHost website: https://yunohost.org/ - ---- - -## Developers info - -Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/gotify_ynh/tree/testing). +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/gotify_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/gotify_ynh/tree/testing --debug or sudo yunohost app upgrade gotify -u https://github.com/YunoHost-Apps/gotify_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 2511267..b4b206c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,52 +1,54 @@ + + # Gotify pour YunoHost -[![Integration level](https://dash.yunohost.org/integration/gotify.svg)](https://dash.yunohost.org/appci/app/gotify) ![](https://ci-apps.yunohost.org/ci/badges/gotify.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/gotify.maintain.svg) -[![Install Gotify with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=gotify) +[![Niveau d'intégration](https://dash.yunohost.org/integration/gotify.svg)](https://dash.yunohost.org/appci/app/gotify) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/gotify.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/gotify.maintain.svg) +[![Installer Gotify avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotify) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Gotify rapidement et simplement sur un serveur Yunohost. +> *Ce package vous permet d'installer Gotify rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble + Gotify est un serveur simple permettant d'envoyer et de recevoir des messages via websocket. -**Version incluse :** 2.1.4 + +**Version incluse :** 2.1.4~ynh2 ## Captures d'écran -[![Screenshot](https://raw.githubusercontent.com/gotify/server/master/ui.png)](https://github.com/gotify/server) +![Capture d'écran de Gotify](./doc/screenshots/ui.png) + +## Avertissements / informations importantes ## Configuration Pour configurer Gotify : > Éditer le fichier `config.yml` avec SSH. -## Documentation +## Documentations et ressources - * Documentation officielle : https://gotify.net/docs/index - * Documentation YunoHost : https://yunohost.org/#/app_gotify_fr - -#### Support multi-utilisateurs - -Pas de support de LDAP (non implémenté upstream) - -## Liens - - * Signaler un bug : https://github.com/YunoHost-Apps/gotify_ynh/issues - * Site de l'application : https://gotify.net/ - * Dépôt de l'application principale : https://github.com/gotify/server - * Site web YunoHost : https://yunohost.org/ - ---- +* Site officiel de l'app : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/gotify_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/gotify_ynh/tree/testing --debug ou sudo yunohost app upgrade gotify -u https://github.com/YunoHost-Apps/gotify_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** From 6d8c48ce1cc32ddbd27b61367de17a2d1610650e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 29 Jul 2022 08:30:37 +0200 Subject: [PATCH 3/5] Update upgrade --- scripts/upgrade | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4885da2..94a3e14 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -62,15 +62,6 @@ ynh_systemd_action --service_name=$app --action="stop" #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set $app is_public 1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set $app is_public 0 - is_public=0 -fi - # If db_name doesn't exist, create it if [ -z $db_name ]; then db_name=$(ynh_sanitize_dbid $app) From 21fdb83ae324f38fb53a5970a2ff4883f2d06f6c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 15 Aug 2022 13:23:22 +0000 Subject: [PATCH 4/5] Auto-update README --- README.md | 1 + README_fr.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c07a60b..440228c 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Gotify is a simple server for sending and receiving messages in real-time per we **Shipped version:** 2.1.4~ynh2 + ## Screenshots ![Screenshot of Gotify](./doc/screenshots/ui.png) diff --git a/README_fr.md b/README_fr.md index b4b206c..ff8b5ca 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,8 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Gotify est un serveur simple permettant d'envoyer et de recevoir des messages via websocket. -**Version incluse :** 2.1.4~ynh2 +**Version incluse :** 2.1.4~ynh2 + ## Captures d'écran From 76070d4bf5b6cb94534b2aab205789081faa694e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 19 Aug 2022 12:31:32 +0200 Subject: [PATCH 5/5] Update check_process --- check_process | 2 ++ 1 file changed, 2 insertions(+) diff --git a/check_process b/check_process index ea87313..a55837d 100644 --- a/check_process +++ b/check_process @@ -19,6 +19,8 @@ setup_public=0 upgrade=1 upgrade=1 from_commit=e0fbbb9a6d2fd87b4d42e85c0fc8f4e479689abc + # 2.1.4~ynh1 + upgrade=1 from_commit=28288aaf8c675b5c4f9b738bf099e242a48bd27f backup_restore=1 multi_instance=1 port_already_use=1