fixes
This commit is contained in:
parent
3f85bc0620
commit
14260f2884
@ -36,11 +36,8 @@ function update_script() {
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Backing up Data"
|
||||
if [[ -d /opt/profilarr/data ]]; then
|
||||
cp -r /opt/profilarr/data /opt/profilarr_data_backup
|
||||
fi
|
||||
if [[ -f /opt/profilarr/.env ]]; then
|
||||
cp /opt/profilarr/.env /opt/profilarr_data_backup/.env 2>/dev/null || true
|
||||
if [[ -d /config ]]; then
|
||||
cp -r /config /opt/profilarr_config_backup
|
||||
fi
|
||||
msg_ok "Backed up Data"
|
||||
|
||||
@ -59,17 +56,15 @@ function update_script() {
|
||||
cd /opt/profilarr/frontend
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
cp -r dist /opt/profilarr/backend/app/static
|
||||
fi
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Restoring Data"
|
||||
if [[ -d /opt/profilarr_data_backup ]]; then
|
||||
mkdir -p /opt/profilarr/data
|
||||
cp -r /opt/profilarr_data_backup/. /opt/profilarr/data
|
||||
if [[ -f /opt/profilarr_data_backup/.env ]]; then
|
||||
cp /opt/profilarr_data_backup/.env /opt/profilarr/.env
|
||||
fi
|
||||
rm -rf /opt/profilarr_data_backup
|
||||
if [[ -d /opt/profilarr_config_backup ]]; then
|
||||
mkdir -p /config
|
||||
cp -r /opt/profilarr_config_backup/. /config/
|
||||
rm -rf /opt/profilarr_config_backup
|
||||
fi
|
||||
msg_ok "Restored Data"
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"documentation": "https://github.com/Dictionarry-Hub/profilarr#readme",
|
||||
"website": "https://github.com/Dictionarry-Hub/profilarr",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/profilarr.webp",
|
||||
"config_path": "/opt/profilarr.env",
|
||||
"config_path": "/config",
|
||||
"description": "Profilarr is a configuration management platform for Radarr and Sonarr that simplifies importing, syncing, and managing quality profiles, custom formats, and release profiles.",
|
||||
"install_methods": [
|
||||
{
|
||||
|
||||
@ -18,7 +18,8 @@ $STD apt install -y \
|
||||
build-essential \
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
libssl-dev
|
||||
libssl-dev \
|
||||
git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
#UV_VERSION="0.7.19"
|
||||
@ -27,7 +28,7 @@ NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Creating directories"
|
||||
mkdir -p /opt/profilarr \
|
||||
/opt/profilarr/data
|
||||
/config
|
||||
msg_ok "Created directories"
|
||||
|
||||
fetch_and_deploy_gh_release "profilarr" "Dictionarry-Hub/profilarr"
|
||||
@ -44,15 +45,10 @@ msg_info "Building Frontend"
|
||||
cd /opt/profilarr/frontend
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
cp -r dist /opt/profilarr/backend/app/static
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/opt/profilarr.env
|
||||
PROFILARR_HOST=0.0.0.0
|
||||
PROFILARR_PORT=6868
|
||||
PROFILARR_DATA_DIR=/opt/profilarr/data
|
||||
PYTHONUNBUFFERED=1
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/profilarr.service
|
||||
[Unit]
|
||||
Description=Profilarr - Configuration Management Platform for Radarr/Sonarr
|
||||
@ -62,9 +58,9 @@ After=network.target
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/profilarr/backend
|
||||
EnvironmentFile=/opt/profilarr.env
|
||||
Environment="PATH=/opt/profilarr/backend/.venv/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
ExecStart=/opt/profilarr/backend/.venv/bin/python -m app.main
|
||||
Environment="PYTHONPATH=/opt/profilarr/backend"
|
||||
ExecStart=/opt/profilarr/backend/.venv/bin/gunicorn --bind 0.0.0.0:6868 --timeout 600 app.main:create_app()
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user