1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/timeoff_ynh.git synced 2024-09-03 20:35:59 +02:00
This commit is contained in:
ericgaspar 2022-02-10 11:09:35 +01:00
parent f664cf2819
commit c228d87594
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 5 additions and 58 deletions

View file

@ -1,14 +1,14 @@
{
"allow_create_new_accounts" : true,
"send_emails" : false,
"send_emails" : false,
"application_sender_email" : "timeoff@__DOMAIN__",
"email_transporter" : {
"host" : "localhost",
"port" : 25,
"port" : 25
},
"ga_analytics_on" : false,
"crypto_secret" : "!2~`HswpPPLa22+=±§sdq qwe,appp qwwokDF_",
"application_domain" : "http://__DOMAIN__",
"promotion_website_domain" : "http://timeoff.management",
"locale_code_for_sorting": "__LANGUAGE__"
"locale_code_for_sorting": "en"
}

View file

@ -6,7 +6,7 @@ After=syslog.target network.target
Type=simple
User=__APP__
Group=__APP__
#Environment="PORT=__PORT__"
Environment="PORT=__PORT__"
Environment="PATH=__ENV_PATH__"
Environment="NODE_ENV=production"
WorkingDirectory=__FINALPATH__/

View file

@ -36,16 +36,6 @@
"name": "is_public",
"type": "boolean",
"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"
}
]
}

View file

@ -5,7 +5,7 @@
#=================================================
# nodejs version
nodejs_version=16
nodejs_version=13
# dependencies used by the app
pkg_dependencies="sqlite3"

View file

@ -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
path_url="/"
language=$YNH_APP_ARG_LANGUAGE
is_public=$YNH_APP_ARG_IS_PUBLIC
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=path --value=$path_url
ynh_app_setting_set --app=$app --key=language --value=$language
#=================================================
# STANDARD MODIFICATIONS
@ -80,16 +78,6 @@ ynh_script_progression --message="Configuring system user..."
# Create a system user
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
#=================================================
@ -102,21 +90,6 @@ ynh_setup_source --dest_dir=$final_path
chmod 750 "$final_path"
chmod -R o-rwx "$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
@ -126,22 +99,6 @@ ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated 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
#=================================================