1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tinyfilemanager_ynh.git synced 2024-09-03 20:36:01 +02:00

Update install

This commit is contained in:
jarod5001 2022-05-16 21:18:03 +01:00 committed by GitHub
parent 6cb6e64d88
commit 3def0e6bc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,8 +30,10 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
language=$YNH_APP_ARG_LANGUAGE
admin=$YNH_APP_ARG_ADMIN
password=$YNH_APP_ARG_PASSWORD
timezone="$(cat /etc/timezone)"
# passhash=php hash.php $password
# phpversion=$YNH_PHP_VERSION
phpversion=$YNH_PHP_VERSION
### 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
@ -259,6 +261,10 @@ ynh_add_config --template="../conf/config.php" --destination="$final_path/config
chmod 600 "$final_path/config.php"
chown $app:$app "$final_path/config.php"
ynh_replace_string --match_string='$CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":false,"hide_Cols":false,"calc_folder":false,"theme":"light"}';'
--replace_string='$CONFIG = '{"lang":"$language","error_reporting":false,"show_hidden":true,"hide_Cols":false,"calc_folder":false,"theme":"light"}';'
--target_file="$final_path/index.php"
### For more complex cases where you want to replace stuff using regexes,
### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)
### When doing so, you also need to manually call ynh_store_file_checksum
@ -311,7 +317,7 @@ chown $app:$app "$final_path/config.php"
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --time --weight=1
#ynh_script_progression --message="Configuring log rotation..." --time --weight=1
### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app.
### Use this helper only if there is effectively a log file for this app.
@ -322,7 +328,7 @@ ynh_script_progression --message="Configuring log rotation..." --time --weight=1
### - And the section "SETUP LOGROTATE" in the upgrade script
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
# ynh_use_logrotate
#=================================================
# INTEGRATE SERVICE IN YUNOHOST