1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

Merge branch 'testing' into update-2024.03

This commit is contained in:
Kayou 2024-04-04 09:53:53 +02:00 committed by GitHub
commit 8aeb4f3fab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 2 deletions

View file

@ -19,7 +19,6 @@ ReadOnlyDirectories=/etc /usr
Restart=always
RestartSec=10
StartLimitBurst=1
StartLimitIntervalSec=10
# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these

View file

@ -38,6 +38,12 @@ fi
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
# clear the smarty cache
# cf: https://github.com/friendica/friendica/issues/11212#issuecomment-1046051750
ynh_secure_remove --file="$install_dir/view/smarty3/compiled"
mkdir "$install_dir/view/smarty3/compiled"
chmod -R 775 "$install_dir/view/smarty3"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
@ -78,7 +84,14 @@ fi
# add the path to the pidfile if missing
if [ -f "$install_dir/config/local.config.php" ] && ! grep -q -e "pidfile" "$install_dir/config/local.config.php"; then
ynh_print_info --message="Patching the Friendica config file: add the PID file path for the daemon..."
ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir',\n 'pidfile' => '$install_dir/daemon.pid'," --target_file="$install_dir/config/local.config.php"
ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir',\n 'pidfile' => '$install_dir/daemon.pid'," --target_file="$install_dir/config/local.config.php"
ynh_store_file_checksum --file="$install_dir/config/local.config.php"
fi
# add log path to the config
if [ -f "$install_dir/config/local.config.php" ] && ! grep -q -e "logfile" "$install_dir/config/local.config.php"; then
ynh_print_info --message="Patching the Friendica config file: add the path for the Friendica logfile..."
ynh_replace_string --match_string="'basepath' => '$install_dir'," --replace_string="'basepath' => '$install_dir',\n 'logfile' => '/var/log/friendica/friendica.log',\n 'loglevel' => 'notice'," --target_file="$install_dir/config/local.config.php"
ynh_store_file_checksum --file="$install_dir/config/local.config.php"
fi