diff options
Diffstat (limited to 'installation')
| -rwxr-xr-x | installation/download-mastofe-build.sh | 21 | ||||
| -rw-r--r-- | installation/pleroma.nginx | 5 | ||||
| -rw-r--r-- | installation/pleroma.service | 2 | 
3 files changed, 12 insertions, 16 deletions
| diff --git a/installation/download-mastofe-build.sh b/installation/download-mastofe-build.sh index ee9e1c217..b8a021ef3 100755 --- a/installation/download-mastofe-build.sh +++ b/installation/download-mastofe-build.sh @@ -9,29 +9,32 @@ static_dir="instance/static"  # project_branch="pleroma"  # static_dir="priv/static" -if [[ ! -d "${static_dir}" ]] +if [ ! -d "${static_dir}" ]  then  	echo "Error: ${static_dir} directory is missing, are you sure you are running this script at the root of pleroma’s repository?"  	exit 1  fi -last_modified="$(curl -s -I 'https://git.pleroma.social/api/v4/projects/'${project_id}'/jobs/artifacts/'${project_branch}'/download?job=build' | grep '^Last-Modified:' | cut -d: -f2-)" +last_modified="$(curl --fail -s -I 'https://git.pleroma.social/api/v4/projects/'${project_id}'/jobs/artifacts/'${project_branch}'/download?job=build' | grep '^Last-Modified:' | cut -d: -f2-)"  echo "branch:${project_branch}"  echo "Last-Modified:${last_modified}"  artifact="mastofe.zip" -if [[ -e mastofe.timestamp ]] && [[ "${last_modified}" != "" ]] +if [ "${last_modified}x" = "x" ]  then -	if [[ "$(cat mastofe.timestamp)" == "${last_modified}" ]] -	then -		echo "MastoFE is up-to-date, exiting…" -		exit 0 -	fi +	echo "ERROR: Couldn't get the modification date of the latest build archive, maybe it expired, exiting..." +	exit 1 +fi + +if [ -e mastofe.timestamp ] && [ "$(cat mastofe.timestamp)" = "${last_modified}" ] +then +	echo "MastoFE is up-to-date, exiting..." +	exit 0  fi -curl -c - "https://git.pleroma.social/api/v4/projects/${project_id}/jobs/artifacts/${project_branch}/download?job=build" -o "${artifact}" || exit +curl --fail -c - "https://git.pleroma.social/api/v4/projects/${project_id}/jobs/artifacts/${project_branch}/download?job=build" -o "${artifact}" || exit  # TODO: Update the emoji as well  rm -fr "${static_dir}/sw.js" "${static_dir}/packs" || exit diff --git a/installation/pleroma.nginx b/installation/pleroma.nginx index d613befd2..9890cb2b1 100644 --- a/installation/pleroma.nginx +++ b/installation/pleroma.nginx @@ -93,9 +93,4 @@ server {          chunked_transfer_encoding on;          proxy_pass         http://phoenix;      } - -    location /api/fedsocket/v1 { -        proxy_request_buffering off; -        proxy_pass http://phoenix/api/fedsocket/v1; -    }  } diff --git a/installation/pleroma.service b/installation/pleroma.service index 5dcbc1387..8338228d8 100644 --- a/installation/pleroma.service +++ b/installation/pleroma.service @@ -29,8 +29,6 @@ ProtectHome=true  ProtectSystem=full  ; Sets up a new /dev mount for the process and only adds API pseudo devices like /dev/null, /dev/zero or /dev/random but not physical devices. Disabled by default because it may not work on devices like the Raspberry Pi.  PrivateDevices=false -; Ensures that the service process and all its children can never gain new privileges through execve(). -NoNewPrivileges=true  ; Drops the sysadmin capability from the daemon.  CapabilityBoundingSet=~CAP_SYS_ADMIN | 
