hnshosting-bot/gitpull.sh

15 lines
261 B
Bash
Raw Normal View History

2023-08-07 14:47:26 +10:00
#!/bin/bash
# Variables
domain=$1
user=$2
# Verify owner
file_path="/etc/nginx/sites-available/$domain"
if grep -q "$user" "$file_path"; then
git -C /var/www/$domain pull
echo "Git pull complete!"
else
echo "ERROR: You do not own this domain"
fi