diff --git a/conf/local-sample.config.php b/conf/local-sample.config.php index be4e5a4..4512ac6 100644 --- a/conf/local-sample.config.php +++ b/conf/local-sample.config.php @@ -43,5 +43,6 @@ return [ 'basepath' => '__INSTALL_DIR__', 'default_timezone' => '__TIMEZONE__', 'language' => '__LANGUAGE__', + 'pidfile' => '__INSTALL_DIR__/daemon.pid', ], ]; diff --git a/conf/systemd.service b/conf/systemd.service index 84ff38c..78f90ac 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -12,7 +12,7 @@ StandardOutput=/var/log/__APP___/daemon.log StandardError=syslog ExecStart=/usr/bin/php__PHPVERSION__ __INSTALL_DIR__/bin/daemon.php start ExecStop=/usr/bin/php__PHPVERSION__ __INSTALL_DIR__/bin/daemon.php stop -PIDFile=friendica/daemon.pid +PIDFile=__INSTALL_DIR__/daemon.pid PrivateTmp=true InaccessibleDirectories=/home /root /boot /opt /mnt /media ReadOnlyDirectories=/etc /usr diff --git a/scripts/upgrade b/scripts/upgrade index 6d6c639..ea00c73 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,6 +70,7 @@ ynh_script_progression --message="Updating a configuration file..." --weight=1 # fix the url if necessary (there should be no trailing slash) if [ -f "$install_dir/config/local.config.php" ] && ! grep -q -e "'url' => 'https://$domain'," "$install_dir/config/local.config.php"; then ynh_replace_string --match_string="'url' => 'https://.*'," --replace_string="'url' => 'https://$domain'," --target_file="$install_dir/config/local.config.php" + ynh_store_file_checksum --file="$install_dir/config/local.config.php" fi #=================================================