Coder Social home page Coder Social logo

kuma_update's Introduction

Script Bash pour la mise à jour d'Uptime Kuma

Ce script Bash est utilisé pour mettre à jour une installation existante d'Uptime Kuma en récupérant la dernière version disponible depuis GitHub. Le script effectue les étapes suivantes :

  1. Accéder au dossier d'installation d'Uptime Kuma :
cd /opt/uptime-kuma/
  1. Récupérer la dernière version disponible en utilisant l'API GitHub :
tag=$(curl --silent "https://api.github.com/repos/louislam/uptime-kuma/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
  1. Mettre à jour depuis le référentiel Git en utilisant la balise (tag) récupérée :
git fetch --all
git checkout $tag --force
  1. Installer les dépendances et les précompilations :
npm install --production
npm run download-dist
  1. Activer l'option d'affichage en iframe :
sed -i 's/\(.*disableFrameSameOrigin.*=.*\)false;/\1true;/' server/server.js
  1. Redémarrer le service Uptime Kuma (adapté selon votre configuration) :
service uptimeKuma restart

Assurez-vous de modifier le chemin du dossier d'installation (/opt/uptime-kuma/) selon votre configuration.

Prérequis

  • Node.js et npm doivent être installés.
  • L'utilisateur exécutant le script doit avoir les permissions nécessaires pour accéder au dossier d'installation et redémarrer le service.

Utilisation

  1. Copiez le contenu du script dans un fichier avec l'extension .sh, par exemple update-uptime-kuma.sh.

  2. Ouvrez un terminal et exécutez la commande suivante pour rendre le script exécutable :

chmod +x update-uptime-kuma.sh
  1. Exécutez le script en utilisant la commande suivante :
./update-uptime-kuma.sh

Le script effectuera les étapes nécessaires pour mettre à jour votre installation d'Uptime Kuma en utilisant la dernière version disponible depuis le référentiel GitHub.

Note : Assurez-vous d'avoir une sauvegarde de votre installation existante avant d'exécuter ce script, au cas où quelque chose ne se passerait pas comme prévu.

kuma_update's People

Contributors

probatou avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.