
Recherche avancée
Autres articles (74)
-
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation" -
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...)
Sur d’autres sites (9661)
-
Anomalie #4728 (En cours) : Dump php, support pour MariaDB
13 avril 2021, par Joachim SENESi Spip fonctionne bien sur des serveurs utilisant MariaDB (comme chez l’hébergeur Nuxit), cela plante pour deux fonctions essentielles :
- Sauvegarde de la base
- Mise à jour via spip_loader.php
Pendant la sauvegarde (je crois que c’est donc ecrire/base/dump.php) le préfixe de table est ignoré.
Pour une base qui fonctionne avec un préfixe comme spippref* ici les erreurs renvoient spip* comme préfixe utilisé :2021-04-09 10:26:24 90.3.175.179 (pid 12829) :Pri:ERREUR: no such table: spip_articles - <br />SELECT COUNT(*)<br />FROM spip_articles - /home/users4/s/sj140phpnet/www/plugins-dist/dump/prive/squelettes/contenu/sauvegarder_fonctions.php L36 [sql_countsel(),dump_afficher_tables_sauvegardees(),html_4efc0080d0d07f4680aa17f4911fe369(),public_parametrer_dist(),public_produire_page_dist(),inclure_page(),evaluer_fond(),recuperer_fond(),eval(),include(),evaluer_fond(),recuperer_fond(),eval(),include(),evaluer_fond(),recuperer_fond(),eval(),include(),include()]<br />2021-04-09 10:26:24 90.3.175.179 (pid 12829) :Pri:ERREUR: Erreur sqlite HY000 / 1<br />2021-04-09 10:26:24 90.3.175.179 (pid 12829) :Pri:ERREUR: no such table: spip_breves -
La sauvegarde indique, dans l’espace privé :
spip_articles (vide)<br />spip_auteurs_liens (82/82)<br />spip_breves (vide)<br />spip_depots (vide)<br />spip_depots_plugins (707/707)<br />spip_documents (vide)<br />spip_documents_liens (116/116)<br />spip_forum (vide)<br />spip_groupes_mots (vide)<br />spip_jobs (7/7)<br />spip_jobs_liens (vide)<br />spip_messages (vide)<br />spip_mots (vide)<br />spip_mots_liens (203/203)<br />spip_paquets (1109/1109)<br />spip_petitions (vide)<br />spip_plugins (732/732)<br />spip_referers (vide)<br />spip_referers_articles (vide)<br />spip_rubriques (vide)<br />spip_signatures (vide)<br />spip_syndic (vide)<br />spip_syndic_articles (vide)<br />spip_types_documents (vide)<br />spip_urls (172/172)<br />spip_versions (vide)<br />spip_versions_fragments (vide)
Sachant que même les tables marquées comme ok 172/172 lignes sauvegardées par ex, sont en erreur dans le log !
2021-04-13 11:29:25 90.3.175.179 (pid 23528) :Pri:ERREUR: no such table: spip_urls -
J’ai échangé avec l’hébergeur, on en est arrivé à cette conclusion possible Spip & MariaDB à ce niveau pose problème. Je ne sais pas aller plus loin, si quelqu’un a besoin d’un FTP sur Nuxit je peux fournir !
Je me suis permis d’assigner en fonction de la signature dans dump.php pour que le ticket soit reçu :)
merci d’avance ! -
Anomalie #3537 (Fermé) : Réinstallation d’un site oblige à créer un nouvel admin (HTML5 effet de b...
28 août 2015, par realet RealETErreur de ma part : j’avais fait une mauvaise restauration, la base était vide.
Donc SPIP est génial :
- si la base est vide, les informations de login sont obligatoires
- sinon, non
\o/
-
Bash script having custom functions not running under systemd service
13 août, par nightcrawlerI have this script to get images from a webcam & process them via RKNN NPU


#!/bin/bash

# Define the temporary directory for images
TEMP_DIR="/media/32GB/pics"
# Define the resize/letterbox option
RESIZE_OPTION="letterbox" # or "letterbox" depending on your requirement
# Define the output image path pattern
OUTPUT_IMAGE_PATH="/media/32GB/processed_pics/%Y-%m-%d_%H-%M-%S_processed.jpg"
# Define the path to the rknn_yolov5_demo_Linux binar
BINARY_PATH="$HOME/ezrknn-toolkit2/rknpu2/examples/rknn_yolov5_demo/install/rknn_yolov5_demo_Linux"
# Define ntfy variables
NTFY_URL="https://ntfy.org/ho"
NTFY_USER="xxx"
NTFY_PASS="xxxx"

# Empty existing content
rm "$TEMP_DIR"/*
# Function to run ffmpeg and write images to temporary files
run_ffmpeg() {
 v380 -u xxxx -p xxxx -addr 192.168.1.xxx | ffmpeg -i - -f image2 -vf fps=3 -strftime 1 "$TEMP_DIR/%Y-%m-%d_%H-%M-%S_cap.jpg" -y
}

# Function to run rknn_yolov5_demo_Linux and process images from temporary files
run_rknn_yolov5_demo() {
 while true; do
 # Find the most recent image file in the temporary directory
 IMAGE_PATH=$(ls -t "$TEMP_DIR"/*.jpg | head -n 1)

 # Check if the image path is not empty
 if [ -n "$IMAGE_PATH" ]; then
 # Define the output image path
 OUTPUT_IMAGE=$(date +"$OUTPUT_IMAGE_PATH")

 # Change to the binary directory and set LD_LIBRARY_PATH
 DETECTION_OUTPUT=$(cd "$BINARY_PATH" && LD_LIBRARY_PATH=./lib ./rknn_yolov5_demo ./model/RK3566_RK3568/yolov5s-640-640.rknn "$IMAGE_PATH" "$RESIZE_OPTION" "$OUTPUT_IMAGE")

 # Check if the detection output contains the word "person"
 if echo "$DETECTION_OUTPUT" | grep -q "person"; then
 echo "Human detected. Saving processed image to $OUTPUT_IMAGE"
 rm "$IMAGE_PATH"
 # Upload the image using the imgur binary and capture the link
 UPLOAD_OUTPUT=$(imgur "$OUTPUT_IMAGE")
 UPLOAD_LINK=$(echo "$UPLOAD_OUTPUT" | grep -m 1 '^http')

 if [ -n "$UPLOAD_LINK" ]; then
 echo "Image uploaded successfully. Link: $UPLOAD_LINK"
 # Send ntfy notification with the image link
 curl -u $NTFY_USER:$NTFY_PASS -H "tags:rotating_light" -H "Attach:$UPLOAD_LINK" -d "Human detected" $NTFY_URL
 else
 echo "Failed to upload image."
 fi
 else
 rm "$OUTPUT_IMAGE"
 rm "$IMAGE_PATH"
 fi
 fi

 # Sleep for a short period to avoid high CPU usage
 sleep 1
 done
}


# Run ffmpeg and rknn_yolov5_demo_Linux in the background
run_ffmpeg &
run_rknn_yolov5_demo &



& the corresponding .service file


[Unit]
Description=Process Images with rknn_yolov5_demo
After=network.target
#StartLimitIntervalSec=60
#StartLimitBurst=5

[Service]
Type=simple
ExecStartPre=/bin/sleep 30
ExecStart=/home/xxx/process_images_rknn.sh
Restart=always
RestartSec=3
TimeoutStartSec=60

[Install]
WantedBy=default.target



Now last x2 lines of script are creating problems.


Case1] If I keep like this
htop
shows no initiation offfmpeg
norrknn
Binaries

Case2] I removed
&
from both lines then onlyffmpeg
runs butrknn
is nowhere inhtop


Case3] Only this case works


run_ffmpeg &
run_rknn_yolov5_demo



I am reloading systemctl daemon & restarting service after script modification in each case