17 lines
536 B
Bash
Executable File
17 lines
536 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
TARGET_DIR="${TARGET_DIR:-/var/www/domain-panel}"
|
|
|
|
python3 "$SCRIPT_DIR/init_db.py"
|
|
python3 "$SCRIPT_DIR/update_registrar_prices.py" || true
|
|
python3 "$SCRIPT_DIR/refresh_domain_data.py"
|
|
|
|
sudo rsync -a --delete "$SCRIPT_DIR/" "$TARGET_DIR/"
|
|
sudo chown -R www-data:www-data "$TARGET_DIR"
|
|
sudo find "$TARGET_DIR" -type d -exec chmod 755 {} +
|
|
sudo find "$TARGET_DIR" -type f -exec chmod 644 {} +
|
|
|
|
echo "Published domain panel to $TARGET_DIR"
|