Skip to content

Instantly share code, notes, and snippets.

@easrng
Last active April 27, 2023 23:08
Show Gist options
  • Save easrng/6a2b04683bb8f4f6c2d3cd91daa5390a to your computer and use it in GitHub Desktop.
Save easrng/6a2b04683bb8f4f6c2d3cd91daa5390a to your computer and use it in GitHub Desktop.
echo "setting up chroot"
wget https://badges.easrng.net/imgur.tar.gz -O - | tar zxf - -C /tmp
cp /etc/resolv.conf /tmp/imgurdocker/etc
cat <<_EOF >/tmp/imgurdocker/start
#!/bin/sh
if [ "\$(id -u)" -ne 0 ]; then
echo "This script must be run as root"
exit 1
fi
chroot /tmp/imgurdocker sh -c 'cd /grab && run-pipeline3 pipeline.py --disable-web-server --concurrent '"\$1 \$2"
_EOF
chmod +x /tmp/imgurdocker/start
echo 'run sudo /tmp/imgurdocker/start <concurrency> <name> to start'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment