Skip to content

Commit

Permalink
fixed virtualenv and requirements issue
Browse files Browse the repository at this point in the history
  • Loading branch information
p0licat committed Jun 22, 2019
1 parent b4776d3 commit c96ac4a
Showing 1 changed file with 47 additions and 7 deletions.
54 changes: 47 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,49 @@
"""
Uncomment lines before merge to confirm behavior is as expected.
"""

#!/usr/bin/env bash

mkdir /etc/digitalocean-dns-updater
cp config.yml /etc/digitalocean-dns-updater
cp *.py /etc/digitalocean-dns-updater
cp dodnsupdater.service /lib/systemd/system
chmod 644 /lib/systemd/system/dodnsupdater.service
systemctl daemon-reload
systemctl enable dodnsupdater.service

for i in "$@"
do
case $i in
--venv=*)
PREFIX="${i#*=}"

;;

esac
done

if [ "$PREFIX" = "" ]
then
echo ""
else
python3 -m virtualenv $PREFIX
ls | grep -v $PREFIX | xargs mv -t $PREFIX
cd $PREFIX
source bin/activate
python3 -m pip install -r requirements.txt


#mkdir /etc/digitalocean-dns-updater
#cp config.yml /etc/digitalocean-dns-updater
#cp *.py /etc/digitalocean-dns-updater

# ETC lines not changed! assuming ./lib is used
# - p0licat
#cp dodnsupdater.service ./lib/systemd/system
#chmod 644 ./lib/systemd/system/dodnsupdater.service

#systemctl daemon-reload
#systemctl enable dodnsupdater.service
fi

#mkdir /etc/digitalocean-dns-updater
#cp config.yml /etc/digitalocean-dns-updater
#cp *.py /etc/digitalocean-dns-updater
#cp dodnsupdater.service /lib/systemd/system
#chmod 644 /lib/systemd/system/dodnsupdater.service
#systemctl daemon-reload
#systemctl enable dodnsupdater.service

0 comments on commit c96ac4a

Please sign in to comment.