kloeckner.com.ar

a backup of my entire webpage
Index Commits Files Refs README LICENSE
scripts/deploy_local.sh (500B)
   1 #!/bin/sh
   2 
   3 root_folder="$1"
   4 html_folder="/var/www/html"
   5 
   6 if [ "$(id -u)" -ne "0" ] ; then
   7     echo "This script must be executed with root privileges."
   8     exit 1
   9 fi
  10 
  11 echo -n "override folder $html_folder with $root_folder? (Y/n)? "
  12 read answer
  13 
  14 if [ "$answer" != "${answer#[Yy]}" ] || [ "$answer" = "" ]; then
  15     rm -drf "$html_folder" >/dev/null 2>&1 ||:
  16     cp -rf "$root_folder" "$html_folder"
  17 else
  18     echo "skipping ..."
  19 fi
  20 
  21 set -xe
  22 
  23 rm "$html_folder"/README.md &>/dev/null 2>&1 ||:
  24 
  25 systemctl restart nginx