mirror of
https://github.com/YunoHost-Apps/kimai2_ynh.git
synced 2024-09-03 19:26:26 +02:00
Upgrade to 1.15.2
This commit is contained in:
parent
3581089633
commit
4bdecbd5bd
8 changed files with 30 additions and 59 deletions
|
@ -1,14 +1,9 @@
|
||||||
# See here for more informations
|
|
||||||
# https://github.com/YunoHost/package_check#syntax-check_process-file
|
|
||||||
|
|
||||||
# Move this file from check_process.default to check_process when you have filled it.
|
|
||||||
|
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
admin="john" (USER)
|
admin="john"
|
||||||
registration=1
|
registration=1
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=0
|
setup_sub_dir=0
|
||||||
|
@ -22,13 +17,7 @@
|
||||||
from_commit=f26285511a167a1ed591a7fa96ae786ea89efb1e
|
from_commit=f26285511a167a1ed591a7fa96ae786ea89efb1e
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
|
|
||||||
# incorrect_path=1
|
|
||||||
port_already_use=0
|
|
||||||
change_url=0
|
change_url=0
|
||||||
;;; Levels
|
|
||||||
# If the level 5 (Package linter) is forced to 1. Please add justifications here.
|
|
||||||
Level 5=auto
|
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=change
|
Notification=change
|
||||||
|
|
|
@ -13,7 +13,7 @@ APP_SECRET=__RANDOM_KEY__
|
||||||
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
||||||
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data/kimai.sqlite"
|
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data/kimai.sqlite"
|
||||||
# Configure your db driver and server_version in config/packages/doctrine.yaml
|
# Configure your db driver and server_version in config/packages/doctrine.yaml
|
||||||
DATABASE_URL=mysql://__DB_USER__:__DB_PASSWORD__@127.0.0.1:3306/__DB_NAME__
|
DATABASE_URL=mysql://__DB_NAME__:__DB_PWD__@127.0.0.1:3306/__DB_NAME__
|
||||||
# DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/kimai.sqlite
|
# DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/kimai.sqlite
|
||||||
###< doctrine/doctrine-bundle ###
|
###< doctrine/doctrine-bundle ###
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ APP_SECRET=__RANDOM_KEY__
|
||||||
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
||||||
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data/kimai.sqlite"
|
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data/kimai.sqlite"
|
||||||
# Configure your db driver and server_version in config/packages/doctrine.yaml
|
# Configure your db driver and server_version in config/packages/doctrine.yaml
|
||||||
# DATABASE_URL=mysql://__DB_USER__:__DB_PASSWORD__@127.0.0.1:3306/__DB_NAME__
|
# DATABASE_URL=mysql://__DB_NAME__:__DB_PWD__@127.0.0.1:3306/__DB_NAME__
|
||||||
DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/kimai.sqlite
|
DATABASE_URL=sqlite:///%kernel.project_dir%/var/data/kimai.sqlite
|
||||||
###< doctrine/doctrine-bundle ###
|
###< doctrine/doctrine-bundle ###
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/kevinpapst/kimai2/archive/refs/tags/1.14.3.tar.gz
|
SOURCE_URL=https://github.com/kevinpapst/kimai2/archive/refs/tags/1.15.2.tar.gz
|
||||||
SOURCE_SUM=1a5d084fbac071ca7c5897ef439bd4bec5fb1f367e6f39b029917590110fda7d
|
SOURCE_SUM=b321983d323bd9471444792c3527cc293376087d2c3b573d7f311f9f4693c394
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
"id": "kimai2",
|
"id": "kimai2",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "A multi-user application for time-tracking with support for mobile devices",
|
"en": "Multi-user application for time-tracking with support for mobile devices",
|
||||||
"fr": "Une application web de suivi du temps, multi-utilisateurs, et compatible avec les appareils mobiles",
|
"fr": "Application web de suivi du temps, multi-utilisateurs, et compatible avec les appareils mobiles",
|
||||||
"de": "Eine web-basierte Mehrbenutzer-Zeiterfassung mit Rechnungsdruck mit Unterstützung für mobile Endgeräte",
|
"de": "Web-basierte Mehrbenutzer-Zeiterfassung mit Rechnungsdruck mit Unterstützung für mobile Endgeräte",
|
||||||
"cs": "Víceuživatelská webová aplikace pro sledování času s podporou mobilních zařízení"
|
"cs": "Víceuživatelská webová aplikace pro sledování času s podporou mobilních zařízení"
|
||||||
},
|
},
|
||||||
"version": "1.14.3~ynh1",
|
"version": "1.14.3~ynh1",
|
||||||
|
@ -15,12 +15,12 @@
|
||||||
"name": "Anmol Sharma"
|
"name": "Anmol Sharma"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.0.0"
|
"yunohost": ">= 4.2.4"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx",
|
||||||
"php7.0-fpm",
|
"php7.3-fpm",
|
||||||
"mysql"
|
"mysql"
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
|
@ -33,8 +33,7 @@
|
||||||
"fr": "Choisissez un nom de domaine pour Kimai2",
|
"fr": "Choisissez un nom de domaine pour Kimai2",
|
||||||
"de": "Wählen Sie einen Domainnamen für Kimai2",
|
"de": "Wählen Sie einen Domainnamen für Kimai2",
|
||||||
"cs": "Zvolte doménu pro Kimai2"
|
"cs": "Zvolte doménu pro Kimai2"
|
||||||
},
|
}
|
||||||
"example": "kimai2.example.com"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
|
@ -44,8 +43,7 @@
|
||||||
"fr": "Choisissez l’administrateur (should be a YunoHost registered user).",
|
"fr": "Choisissez l’administrateur (should be a YunoHost registered user).",
|
||||||
"de": "Wählen Sie einen Admin Benutzer (sollte ein registrierter YunoHost Benutzer sein).",
|
"de": "Wählen Sie einen Admin Benutzer (sollte ein registrierter YunoHost Benutzer sein).",
|
||||||
"cs": "Zvolte administrátora (musí to být registrovaný uživatel YunoHostu)."
|
"cs": "Zvolte administrátora (musí to být registrovaný uživatel YunoHostu)."
|
||||||
},
|
}
|
||||||
"example": "johndoe"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
|
|
|
@ -14,9 +14,6 @@ source /usr/share/yunohost/helpers
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_clean_setup () {
|
|
||||||
true
|
|
||||||
}
|
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
@ -51,17 +48,14 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
# BACKUP THE PHP-FPM CONFIGURATION
|
# BACKUP THE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/php/${YNH_PHP_VERSION}/fpm/pool.d/$app.conf"
|
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE MYSQL DATABASE
|
# BACKUP THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
|
||||||
ynh_print_info --message="Backing up the MySQL database..."
|
ynh_print_info --message="Backing up the MySQL database..."
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|
||||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
|
||||||
|
|
||||||
|
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -14,9 +14,6 @@ source /usr/share/yunohost/helpers
|
||||||
# MANAGE SCRIPT FAILURE
|
# MANAGE SCRIPT FAILURE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_clean_setup () {
|
|
||||||
true
|
|
||||||
}
|
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
@ -52,19 +49,17 @@ ynh_script_progression --message="Storing installation settings..."
|
||||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
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=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
|
||||||
ynh_app_setting_set --app=$app --key=registration --value=$registration
|
ynh_app_setting_set --app=$app --key=registration --value=$registration
|
||||||
ynh_app_setting_set --app=$app --key=random_key --value=$random_key
|
ynh_app_setting_set --app=$app --key=random_key --value=$random_key
|
||||||
ynh_app_setting_set --app=$app --key=update --value=$update
|
ynh_app_setting_set --app=$app --key=update --value=$update
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
ynh_script_progression --message="Configuring system user..."
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Installing dependencies..."
|
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
# Create a system user
|
||||||
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -74,25 +69,20 @@ ynh_script_progression --message="Setting up source files..."
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
|
|
||||||
# Clone the latest version
|
# Clone the latest version
|
||||||
|
git clone -b $tag --depth 1 https://github.com/kevinpapst/kimai2.git $final_path --quiet
|
||||||
|
|
||||||
git clone -b $tag --depth 1 https://github.com/kevinpapst/kimai2.git $final_path
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring nginx web server..."
|
ynh_script_progression --message="Configuring NGINX web server..."
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE DEDICATED USER
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring system user..."
|
|
||||||
|
|
||||||
# Create a system user
|
|
||||||
ynh_system_user_create --username=$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -130,10 +120,14 @@ ynh_app_setting_set --app=$app --key=db_name --value=$db_n
|
||||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
||||||
ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf"
|
ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf"
|
||||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf"
|
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf"
|
||||||
ynh_replace_string --match_string="__DB_PASSWORD__" --replace_string="$db_pwd" --target_file="$env_conf"
|
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$env_conf"
|
||||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_name" --target_file="$env_conf"
|
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_name" --target_file="$env_conf"
|
||||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$env_conf"
|
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$env_conf"
|
||||||
|
|
||||||
|
|
||||||
|
#ynh_add_config --template="../conf/.env.mysql" --destination="$final_path/.env"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BUILD KIMAI2
|
# BUILD KIMAI2
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -177,7 +171,6 @@ ynh_permission_create --permission="super_admin" --allowed "$admin"
|
||||||
# Make app public if necessary
|
# Make app public if necessary
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
|
||||||
ynh_permission_update --permission "main" --add "visitors"
|
ynh_permission_update --permission "main" --add "visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..."
|
ynh_script_progression --message="Validating restoration parameters..."
|
||||||
|
|
||||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
|
||||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
|
||||||
test ! -d $final_path \
|
test ! -d $final_path \
|
||||||
|| ynh_die --message="There is already a directory: $final_path "
|
|| ynh_die --message="There is already a directory: $final_path "
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue