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/public-webserver/dotfiles-setup.d.fish

20 lines
372 B
Fish
Raw Normal View History

2022-09-29 13:59:18 -05:00
#!/usr/bin/env fish
pushd (dirname (status -f))
2022-11-22 14:35:47 -06:00
# set dfp $argv[1]
# set homedir $argv[2]
# set xdgconfdir $argv[3]
2022-09-29 13:59:18 -05:00
set layerdir (pwd)
2022-09-29 15:21:05 -05:00
function _p
2022-11-22 14:35:47 -06:00
echo Copying $argv[1..-2] to $argv[-1]
sudo cp -r $argv[1..-2] $argv[-1]
2022-09-29 13:59:18 -05:00
end
2022-11-22 14:35:47 -06:00
sudo rm -rf /etc/caddy
2022-09-29 15:21:05 -05:00
_p $layerdir/caddy /etc/caddy
2022-11-22 14:35:47 -06:00
sudo mkdir -p /srv/http
sudo chmod 755 /srv/http
_p $layerdir/webserver-root/* /srv/http