mirror of
https://github.com/YunoHost-Apps/timeoff_ynh.git
synced 2024-09-03 20:35:59 +02:00
Fix
This commit is contained in:
parent
f664cf2819
commit
c228d87594
5 changed files with 5 additions and 58 deletions
|
@ -1,14 +1,14 @@
|
||||||
{
|
{
|
||||||
"allow_create_new_accounts" : true,
|
"allow_create_new_accounts" : true,
|
||||||
"send_emails" : false,
|
"send_emails" : false,
|
||||||
"application_sender_email" : "timeoff@__DOMAIN__",
|
"application_sender_email" : "timeoff@__DOMAIN__",
|
||||||
"email_transporter" : {
|
"email_transporter" : {
|
||||||
"host" : "localhost",
|
"host" : "localhost",
|
||||||
"port" : 25,
|
"port" : 25
|
||||||
},
|
},
|
||||||
"ga_analytics_on" : false,
|
"ga_analytics_on" : false,
|
||||||
"crypto_secret" : "!2~`HswpPPLa22+=±§sdq qwe,appp qwwokDF_",
|
"crypto_secret" : "!2~`HswpPPLa22+=±§sdq qwe,appp qwwokDF_",
|
||||||
"application_domain" : "http://__DOMAIN__",
|
"application_domain" : "http://__DOMAIN__",
|
||||||
"promotion_website_domain" : "http://timeoff.management",
|
"promotion_website_domain" : "http://timeoff.management",
|
||||||
"locale_code_for_sorting": "__LANGUAGE__"
|
"locale_code_for_sorting": "en"
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ After=syslog.target network.target
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
#Environment="PORT=__PORT__"
|
Environment="PORT=__PORT__"
|
||||||
Environment="PATH=__ENV_PATH__"
|
Environment="PATH=__ENV_PATH__"
|
||||||
Environment="NODE_ENV=production"
|
Environment="NODE_ENV=production"
|
||||||
WorkingDirectory=__FINALPATH__/
|
WorkingDirectory=__FINALPATH__/
|
||||||
|
|
|
@ -36,16 +36,6 @@
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "language",
|
|
||||||
"type": "string",
|
|
||||||
"ask": {
|
|
||||||
"en": "Choose the application language",
|
|
||||||
"fr": "Choisissez la langue de l'application"
|
|
||||||
},
|
|
||||||
"choices": ["cs", "de", "fr", "en"],
|
|
||||||
"default": "fr"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# nodejs version
|
# nodejs version
|
||||||
nodejs_version=16
|
nodejs_version=13
|
||||||
|
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies="sqlite3"
|
pkg_dependencies="sqlite3"
|
||||||
|
|
|
@ -21,7 +21,6 @@ ynh_abort_if_errors # Active trap pour arrêter le script si une erreur est dét
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url="/"
|
path_url="/"
|
||||||
language=$YNH_APP_ARG_LANGUAGE
|
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
@ -44,7 +43,6 @@ 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=language --value=$language
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -80,16 +78,6 @@ ynh_script_progression --message="Configuring system user..."
|
||||||
# Create a system user
|
# Create a system user
|
||||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE A MYSQL DATABASE
|
|
||||||
#=================================================
|
|
||||||
# ynh_script_progression --message="Creating a MySQL database..."
|
|
||||||
|
|
||||||
# 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
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -102,21 +90,6 @@ ynh_setup_source --dest_dir=$final_path
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
#chmod -R +x "$final_path/bin"
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE DATA DIRECTORY
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Creating a data directory..." --weight=1
|
|
||||||
|
|
||||||
datadir=/home/yunohost.app/$app
|
|
||||||
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
|
||||||
|
|
||||||
mkdir -p $datadir
|
|
||||||
|
|
||||||
chmod 750 "$datadir"
|
|
||||||
chmod -R o-rwx "$datadir"
|
|
||||||
chown -R $app:www-data "$datadir"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
@ -126,22 +99,6 @@ 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
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC SETUP
|
|
||||||
#=================================================
|
|
||||||
# HANDLE LOG FILES AND LOGROTATE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Create log directory
|
|
||||||
mkdir -p /var/log/$app
|
|
||||||
touch /var/log/$app/installation.log
|
|
||||||
install_log=/var/log/$app/installation.log
|
|
||||||
touch $install_log
|
|
||||||
chown $app -R /var/log/$app
|
|
||||||
|
|
||||||
# Setup logrotate
|
|
||||||
ynh_use_logrotate
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL
|
# INSTALL
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue