2021-10-08 15:45:28 +02:00

18 lines
911 B
Bash
Executable File

#!/bin/bash
DAT=$(date "+%u")
DEST=/home/sv/d/"${DAT}"
HOST=root@192.168.0.29
ssh "${HOST}" apt install -y rsync apache2 mariadb-server php
ssh "${HOST}" "mysql CREATE DATABASES wordpress;" #a refaire
ssh "${HOST}" "mysql -u wordpress_user -pqdrhh45 wordpress < "${DEST}"/wordpress.sql" #a refaire
scp -r "${DEST}"/wordpress "${HOST}":/var/www/html/
scp "${DEST}"/default-ssl.conf "${HOST}":/etc/apache2/sites-available/
scp "${DEST}"/wordpress.conf "${HOST}":/etc/apache2/sites-available/
scp "${DEST}"/server.key "${HOST}":/etc/apache2/
scp "${DEST}"/server.crt "${HOST}":/etc/apache2/
#rsync -az "${DEST}"/wordpress "${HOST}":/var/www/html/
#rsync -az "${DEST}"/default-ssl.conf "${HOST}":/etc/apache2/sites-available/
#rsync -az "${DEST}"/wordpress.conf "${HOST}":/etc/apache2/sites-available/
#rsync -az "${DEST}"/server.key "${HOST}":/etc/apache2/
#rsync -az "${DEST}"/server.crt "${HOST}":/etc/apache2/