diff --git a/worker/install.sh b/worker/install.sh index 3865c73..310d0ea 100644 --- a/worker/install.sh +++ b/worker/install.sh @@ -18,4 +18,7 @@ sudo apt install docker-compose -y sudo apt install nginx -y # Install python prerequisites -python3 -m pip install -r requirements.txt \ No newline at end of file +sudo apt install python3-pip -y +python3 -m pip install -r requirements.txt +cp .env.example .env +chmod +x wp.sh \ No newline at end of file diff --git a/worker/main.py b/worker/main.py index 09980f7..9f8ebd7 100644 --- a/worker/main.py +++ b/worker/main.py @@ -23,6 +23,10 @@ def new_site(): sites_file = open('sites.txt', 'a') sites_file.write(domain + '\n') + # Setup site run wp.sh + # Get num sites + os.system('bash wp.sh ' + domain + ' '+ count) + # Return the domain and the number of sites return jsonify({'domain': domain, 'count': count})