14 lines
287 B
Bash
Executable File
14 lines
287 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
APP_DIR="/srv/tg-bot"
|
|
mkdir -p "$APP_DIR"
|
|
rsync -a --delete --exclude ".git" ./ "$APP_DIR"/
|
|
cd "$APP_DIR"
|
|
if [ -f package.json ]; then
|
|
if command -v npm >/dev/null 2>&1; then
|
|
npm ci || npm install
|
|
fi
|
|
fi
|
|
systemctl restart tg_filebrowser_bot
|
|
|