Testing Python venv

This commit is contained in:
Donald Cheng Hong Zou
2021-12-25 14:44:14 -05:00
parent 5c588ea01a
commit 8d29cb7488
2 changed files with 14 additions and 3 deletions

View File

@@ -48,13 +48,13 @@ install_wgd(){
# set up the local environment
_check_and_set_venv
python3 -m pip install -U -r requirements.txt > /dev/null 2>&1
${VIRTUAL_ENV} -m pip install -U -r requirements.txt > /dev/null 2>&1
printf "| WGDashboard installed successfully! |\n"
printf "| Preparing the systemctl unit file |\n"
sed -i "s#{{APP_ROOT}}#${APP_ROOT}#" wg-dashboard.service
sed -i "s#{{VIRTUAL_ENV}}#${VIRTUAL_ENV}#" wg-dashboard.service
cat wg-dashboard.service | sudo SYSTEMD_EDITOR=tee systemctl edit --force --full wg-dashboard.service
# cat wg-dashboard.service | sudo SYSTEMD_EDITOR=tee systemctl edit --force --full wg-dashboard.service
systemctl daemon-reload
printf "| Consider 'systemctl enable wg-dashboard' |\n"
printf " and 'systemctl start wg-dashboard'\n"