Wizarr: lowercase and hardcode app name
This commit is contained in:
parent
69f14faa4b
commit
ecff502e0a
@ -44,8 +44,8 @@ function update_script() {
|
|||||||
rm -rf /opt/wizarr
|
rm -rf /opt/wizarr
|
||||||
curl -fsSL "https://github.com/wizarrrr/wizarr/archive/refs/tags/${RELEASE}.zip" -o /tmp/"$RELEASE".zip
|
curl -fsSL "https://github.com/wizarrrr/wizarr/archive/refs/tags/${RELEASE}.zip" -o /tmp/"$RELEASE".zip
|
||||||
unzip -q /tmp/"$RELEASE".zip
|
unzip -q /tmp/"$RELEASE".zip
|
||||||
mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION}
|
mv wizarr-${RELEASE}/ /opt/wizarr
|
||||||
cd /opt/"$APPLICATION"
|
cd /opt/wizarr
|
||||||
uv -q sync --locked
|
uv -q sync --locked
|
||||||
ln -s ./app/translations ./translations
|
ln -s ./app/translations ./translations
|
||||||
$STD tar -xf "$BACKUP_PATH" --directory=/
|
$STD tar -xf "$BACKUP_PATH" --directory=/
|
||||||
|
@ -27,23 +27,23 @@ msg_info "Installing ${APPLICATION}"
|
|||||||
RELEASE=$(curl -s https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
curl -fsSL "https://github.com/wizarrrr/wizarr/archive/refs/tags/${RELEASE}.zip" -o /tmp/"$RELEASE".zip
|
curl -fsSL "https://github.com/wizarrrr/wizarr/archive/refs/tags/${RELEASE}.zip" -o /tmp/"$RELEASE".zip
|
||||||
unzip -q /tmp/"$RELEASE".zip
|
unzip -q /tmp/"$RELEASE".zip
|
||||||
mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION}
|
mv wizarr-${RELEASE}/ /opt/wizarr
|
||||||
cd /opt/"$APPLICATION"
|
cd /opt/wizarr
|
||||||
uv -q sync --locked
|
uv -q sync --locked
|
||||||
ln -s ./app/translations ./translations
|
ln -s ./app/translations ./translations
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
echo "${RELEASE}" >/opt/wizarr_version.txt
|
||||||
msg_ok "Installed ${APPLICATION}"
|
msg_ok "Installed ${APPLICATION}"
|
||||||
|
|
||||||
msg_info "Creating env, start script and service"
|
msg_info "Creating env, start script and service"
|
||||||
LOCAL_IP="$(hostname -I | awk '{print $1}')"
|
LOCAL_IP="$(hostname -I | awk '{print $1}')"
|
||||||
cat <<EOF >/opt/"$APPLICATION"/.env
|
cat <<EOF >/opt/wizarr/.env
|
||||||
APP_URL=http://${LOCAL_IP}
|
APP_URL=http://${LOCAL_IP}
|
||||||
DISABLE_BUILTIN_AUTH=false
|
DISABLE_BUILTIN_AUTH=false
|
||||||
LOG_LEVEL=INFO
|
LOG_LEVEL=INFO
|
||||||
SECRET_KEY="$(openssl rand -base64 30)"
|
SECRET_KEY="$(openssl rand -base64 30)"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >/opt/"$APPLICATION/start.sh"
|
cat <<EOF >/opt/wizarr/start.sh
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
uv run flask db upgrade && uv run gunicorn \
|
uv run flask db upgrade && uv run gunicorn \
|
||||||
@ -54,24 +54,24 @@ uv run flask db upgrade && uv run gunicorn \
|
|||||||
--umask 007 \
|
--umask 007 \
|
||||||
run:app
|
run:app
|
||||||
EOF
|
EOF
|
||||||
chmod u+x /opt/"$APPLICATION"/start.sh
|
chmod u+x /opt/wizarr/start.sh
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
|
cat <<EOF >/etc/systemd/system/wizarr.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=${APPLICATION} Service
|
Description=${APPLICATION} Service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/opt/${APPLICATION}
|
WorkingDirectory=/opt/wizarr
|
||||||
EnvironmentFile=/opt/${APPLICATION}/.env
|
EnvironmentFile=/opt/wizarr/.env
|
||||||
ExecStart=/opt/${APPLICATION}/start.sh
|
ExecStart=/opt/wizarr/start.sh
|
||||||
Restart=on-abnormal
|
Restart=on-abnormal
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now ${APPLICATION}.service
|
systemctl enable -q --now wizarr.service
|
||||||
msg_ok "Created env, start script and service"
|
msg_ok "Created env, start script and service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user