HEX
Server: nginx/1.18.0
System: Linux vps-9dcdb12e 5.15.0-176-generic #186-Ubuntu SMP Fri Mar 13 11:01:42 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.24
Disabled: exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
Upload Files
File: //tmp/setthumb.sh
#!/bin/bash
SLUG="gabinet-masazu-piotr-czajkowski-kielce"
IMGFILE="/tmp/masaz_featured.jpg"
while read d; do
  [ -z "$d" ] && continue
  P="/var/www/$d"
  [ ! -f "$P/wp-config.php" ] && { echo "$d|NOWP"; continue; }
  WPU="sudo -u www-data wp --path=$P --allow-root --skip-themes --skip-plugins"
  pid=$($WPU post list --post_type=post --name="$SLUG" --field=ID 2>/dev/null | head -1)
  [ -z "$pid" ] && { echo "$d|NOPID"; continue; }
  th=$($WPU post meta get $pid _thumbnail_id 2>/dev/null | head -1)
  [ -n "$th" ] && { echo "$d|JUZ:$th"; continue; }
  aid=$($WPU media import "$IMGFILE" --post_id=$pid --featured_image --title="Masaż Kielce - gabinet Piotra Czajkowskiego" --porcelain 2>/dev/null | tail -1)
  echo "$d|${aid:-FAIL}"
done < /tmp/ovh30.txt