1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-06-30 22:50:14 +02:00

added paths when command as root

This commit is contained in:
Galonza Peter 2021-10-18 02:58:54 +03:00
parent bb298164e4
commit e0bf648076

View File

@ -58,7 +58,10 @@ start_wgd () {
then mkdir "log"
fi
d=$(date '+%Y%m%d%H%M%S')
/usr/local/bin/gunicorn --access-logfile log/access_"$d".log \
if [[ $USER == root ]]; then
export PATH=$PATH:/usr/local/bin:$HOME/.local/bin
fi
gunicorn --access-logfile log/access_"$d".log \
--error-logfile log/error_"$d".log 'dashboard:run_dashboard()'
printf "| Log files is under log/ |\n"
printf "%s\n" "$dashes"