File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9999 deploy_dir=/opt/lithoscan-mainnet
100100 active=/etc/nginx/sites-enabled/lithoscan.ai.conf
101101 upload_dir="$deploy_dir/tls-staging"
102+ current_user="$(id -un)"
102103
103104 actual_helper_sha="$(sha256sum "$helper" | cut -d' ' -f1)"
104105 echo "helper_sha256=$actual_helper_sha"
@@ -122,11 +123,11 @@ jobs:
122123 stat --format='tls_staging=%F owner=%U:%G mode=%a path=%n' "$upload_dir"
123124 test -d "$upload_dir" && test ! -L "$upload_dir" || { echo "TLS staging path is not a real directory" >&2; exit 1; }
124125 test "$(readlink -f "$upload_dir")" = "$upload_dir" || { echo "TLS staging path contains a symlink" >&2; exit 1; }
125- test "$(stat -c %U "$upload_dir")" = "$USER " || { echo "TLS staging directory owner differs from deploy user" >&2; exit 1; }
126+ test "$(stat -c %U "$upload_dir")" = "$current_user " || { echo "TLS staging directory owner differs from deploy user" >&2; exit 1; }
126127 test "$(stat -c %a "$upload_dir")" = 700 || { echo "TLS staging directory must use mode 0700" >&2; exit 1; }
127128 else
128129 install -d -m 0700 "$upload_dir"
129- echo "tls_staging=created owner=$USER mode=700 path=$upload_dir"
130+ echo "tls_staging=created owner=$current_user mode=700 path=$upload_dir"
130131 fi
131132 rm -f -- "$upload_dir/fullchain.pem" "$upload_dir/privkey.pem"
132133 REMOTE
You can’t perform that action at this time.
0 commit comments