This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/host/layer/nginx-user-public/dotfiles-setup.d.fish

20 lines
624 B
Fish
Raw Normal View History

#!/usr/bin/env fish
set me (status -f)
set dfp $argv[1]
set h $argv[2]
set c $argv[3]
pushd (dirname $me)
2022-08-26 00:04:32 -05:00
function _cp
2022-05-25 13:14:36 -05:00
sudo rm -f "$argv[2]"
2022-08-26 00:04:32 -05:00
echo "Copying $argv[1] to $argv[2]"
sudo cp "$argv[1]" "$argv[2]"
2022-05-25 13:14:36 -05:00
end
2022-08-26 00:04:32 -05:00
_cp (pwd)/user-public-http.conf /etc/nginx/user-public-http.conf
_cp (pwd)/user-public-server.conf /etc/nginx/user-public-server.conf
_cp (pwd)/.nginx-autoindex-before.html /usr/share/nginx/html/.nginx-autoindex-before.html
_cp (pwd)/.nginx-autoindex-after.html /usr/share/nginx/html/.nginx-autoindex-after.html
2022-05-25 13:14:36 -05:00
echo 'Don\'t forget to include the nginx files in your config inside their respective blocks!'