Skip to content

Instantly share code, notes, and snippets.

@gokaybiz
Last active September 15, 2020 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gokaybiz/3314547b0b6eb4d3c5feb8b91555adc9 to your computer and use it in GitHub Desktop.
Save gokaybiz/3314547b0b6eb4d3c5feb8b91555adc9 to your computer and use it in GitHub Desktop.
netflix-proxy | Fix: Error: near "$pbkdf2": syntax error.
#!/usr/bin/env bash
# globals
CWD=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
SQLITE_DB=${CWD}/db/auth.db
read -sp "Please enter a new admin password: " PASSWORD && printf "\n"
pushd ${CWD} && \
export HASH=`${CWD}/pbkdf2_sha256_hash.py ${PASSWORD} | awk '{print substr($2, 2, length($2)-3)}'` && \
sqlite3 ${SQLITE_DB} "UPDATE USERS SET password='${HASH}' WHERE id=1;" && \
popd && \
printf "rc=$?\n"
sudo apt-get update\
&& echo $(hostname -I | cut -d\ -f1) $(hostname) | sudo tee -a /etc/hosts\
&& sudo apt-get install net-tools -y\
&& sudo apt install python-minimal -y\
&& sudo apt-get install python3-pip -y\
&& sudo apt-get install python-pip -y\
&& pip install paramiko PyYAML jinja2 httplib2 passlib\
&& sudo apt-get install tango-common -y\
&& sudo apt-get -y install vim dnsutils curl\
&& curl -fsSL https://get.docker.com/ | sh || apt-get -y install docker.io\
&& sudo usermod -aG docker $(whoami | awk '{print $1}')\
&& mkdir -p ~/netflix-proxy\
&& cd ~/netflix-proxy\
&& curl -fsSL https://github.com/ab77/netflix-proxy/archive/latest.tar.gz | gunzip - | tar x --strip-components=1\
&& ./build.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment