1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lionwiki-t2t_ynh.git synced 2024-09-03 19:36:27 +02:00

integrate custom color

integrate wiki name label
This commit is contained in:
farvardin 2020-03-27 10:52:32 +01:00
parent b411e03a6a
commit dfffb16bae
6 changed files with 1174 additions and 23 deletions

1143
conf/minimaxing.less Executable file

File diff suppressed because it is too large Load diff

View file

@ -1,13 +0,0 @@
[Unit]
Description=Small description of the service
After=network.target
[Service]
Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__/
ExecStart=__FINALPATH__/script >> /var/log/__APP__/__APP__.log 2>&1
[Install]
WantedBy=multi-user.target

View file

@ -81,6 +81,19 @@
"fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question."
},
"example": "Choose a password"
},
{
"name": "color",
"type": "string",
"ask": {
"en": "Set default color base",
"fr": "Définissez la couleur de base"
},
"help": {
"en": "Use hexadecimal value",
"fr": "Utilisez une valeur hexadecimale"
},
"example": "#D07732"
}
]
}

View file

@ -37,9 +37,9 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --time --weight=1
#ynh_script_progression --message="Stopping a systemd service..." --time --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
#ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
#=================================================
# BACKUP THE APP MAIN DIR

View file

@ -30,6 +30,8 @@ admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC
language=$YNH_APP_ARG_LANGUAGE
password=$YNH_APP_ARG_PASSWORD
label=$YNH_APP_ARG_LIONWIKI-T2T
color=$YNH_APP_ARG_COLOR
### If it's a multi-instance app, meaning it can be installed several times independently
### The id of the app as stated in the manifest is available as $YNH_APP_ID
@ -180,6 +182,8 @@ ynh_add_fpm_config
# It will only be updated by Yunohost package or directly by adventurous users
cp ../conf/config.php $final_path/
cp ../conf/minimaxing.less $final_path/templates/minimaxing/
# Set the password
ynh_replace_string --match_string="__YNH_PASSWORD__" --replace_string="$password" --target_file="$final_path/config.php"
@ -188,6 +192,10 @@ ynh_replace_string --match_string="__YNH_PASSWORD__" --replace_string="$password
ynh_replace_string --match_string="__YNH_LANG__" --replace_string="$language" --target_file="$final_path/config.php"
ynh_replace_string --match_string="__YNH_LABEL__" --replace_string="$label" --target_file="$final_path/config.php"
ynh_replace_string --match_string="__YNH_COLOR__" --replace_string="$color" --target_file="$final_path/config.php"
@ -196,7 +204,7 @@ ynh_replace_string --match_string="__YNH_LANG__" --replace_string="$language"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --time --weight=1
#ynh_script_progression --message="Configuring a systemd service..." --time --weight=1
### `ynh_systemd_config` is used to configure a systemd script for an app.
### It can be used for apps that use sysvinit (with adaptation) or systemd.
@ -210,7 +218,7 @@ ynh_script_progression --message="Configuring a systemd service..." --time --wei
### - And the section "SETUP SYSTEMD" in the upgrade script
# Create a dedicated systemd config
ynh_add_systemd_config
#ynh_add_systemd_config
#=================================================
# SETUP APPLICATION WITH CURL

View file

@ -111,23 +111,23 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./
#=================================================
# RESTORE SYSTEMD
#=================================================
ynh_script_progression --message="Restoring the systemd configuration..." --time --weight=1
#ynh_script_progression --message="Restoring the systemd configuration..." --time --weight=1
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service
#ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
#systemctl enable $app.service
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log"
#yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
#ynh_script_progression --message="Starting a systemd service..." --time --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
#ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
#=================================================
# RESTORE THE CRON FILE