Putting the snap behind a reverse proxy
cadaver
How to download a file from owncloud with curl, wget
lxc launch ubuntu:18.04 web2
lxc exec web2 -- sudo --user ubuntu --login
sudo apt update
sudo apt upgrade
sudo apt install mc
sudo dpkg-reconfigure locales
sudo dpkg-reconfigure tzdata
sudo dpkg-reconfigure keyboard-configuration
sudo snap find nextcloud
sudo snap install nextcloud
exit
lxc list
| web2 | RUNNING | 10.91.211.95 (eth0) | | PERSISTENT | 0 |
lxc exec haproxy -- sudo --user ubuntu --login
sudo nano /etc/hosts
10.91.211.95 web2.lxd
Сохранить.
sudo reboot
lxc exec web2 -- sudo --user ubuntu --login
$ sudo nextcloud.occ config:system:set overwritehost --value="web2.mydomain.com"
$ sudo nextcloud.occ config:system:set overwriteprotocol --value="https"
https://web2.mydomain.com/remote.php/webdav/
sudo apt install cadaver
cadaver https://web2.mydomain.com/remote.php/webdav/
Использование cadaver в скриптах:
nano dl_8.3.15.1778.sh
#!/bin/bash
rm -f ~/.netrc
cat > ~/.netrc <<EOF
machine web2.mydomain.com
login user
password password
EOF
chmod 600 ~/.netrc
rm -f ~/setup-1c/dist/dat
cat > ~/setup-1c/dist/dat <<EOF
open https://web2.mydomain.com/remote.php/webdav/
ls
get postgresql_10.10_4.1C_amd64_deb.tar.bz2 postgresql_10.10_4.1C_amd64_deb.tar.bz2
get postgresql_11.5_7.1C_amd64_deb.tar.bz2 postgresql_11.5_7.1C_amd64_deb.tar.bz2
get client_8_3_15_1778.deb64.tar.gz client_8_3_15_1778.deb64.tar.gz
get deb64_8_3_15_1778.tar.gz deb64_8_3_15_1778.tar.gz
quit
EOF
cd ~/setup-1c/dist/
cadaver -r dat
rm -f ~/.netrc
rm -f ~/setup-1c/dist/dat
cd ~/setup-1c/scripts
Сохранить.
sh dl_8.3.15.1778.sh
$ curl -J -O https://.....
cadaver
How to download a file from owncloud with curl, wget
lxc launch ubuntu:18.04 web2
lxc exec web2 -- sudo --user ubuntu --login
sudo apt update
sudo apt upgrade
sudo apt install mc
sudo dpkg-reconfigure locales
sudo dpkg-reconfigure tzdata
sudo dpkg-reconfigure keyboard-configuration
sudo snap find nextcloud
sudo snap install nextcloud
exit
lxc list
| web2 | RUNNING | 10.91.211.95 (eth0) | | PERSISTENT | 0 |
lxc exec haproxy -- sudo --user ubuntu --login
sudo nano /etc/hosts
10.91.211.95 web2.lxd
Сохранить.
sudo reboot
lxc exec web2 -- sudo --user ubuntu --login
$ sudo nextcloud.occ config:system:set overwritehost --value="web2.mydomain.com"
$ sudo nextcloud.occ config:system:set overwriteprotocol --value="https"
https://web2.mydomain.com/remote.php/webdav/
sudo apt install cadaver
cadaver https://web2.mydomain.com/remote.php/webdav/
Использование cadaver в скриптах:
nano dl_8.3.15.1778.sh
#!/bin/bash
rm -f ~/.netrc
cat > ~/.netrc <<EOF
machine web2.mydomain.com
login user
password password
EOF
chmod 600 ~/.netrc
rm -f ~/setup-1c/dist/dat
cat > ~/setup-1c/dist/dat <<EOF
open https://web2.mydomain.com/remote.php/webdav/
ls
get postgresql_10.10_4.1C_amd64_deb.tar.bz2 postgresql_10.10_4.1C_amd64_deb.tar.bz2
get postgresql_11.5_7.1C_amd64_deb.tar.bz2 postgresql_11.5_7.1C_amd64_deb.tar.bz2
get client_8_3_15_1778.deb64.tar.gz client_8_3_15_1778.deb64.tar.gz
get deb64_8_3_15_1778.tar.gz deb64_8_3_15_1778.tar.gz
quit
EOF
cd ~/setup-1c/dist/
cadaver -r dat
rm -f ~/.netrc
rm -f ~/setup-1c/dist/dat
cd ~/setup-1c/scripts
Сохранить.
sh dl_8.3.15.1778.sh
$ curl -J -O https://.....
- -J (use remote header name)
- -O (use remote name)
Комментариев нет:
Отправить комментарий