mirror of
https://github.com/YunoHost-Apps/lutim_ynh.git
synced 2024-09-03 19:36:24 +02:00
Mise à jour du manifest et du readme
This commit is contained in:
parent
8a91e320ef
commit
d1c6879d4c
7 changed files with 106 additions and 42 deletions
|
@ -3,4 +3,8 @@ Lutim for YunoHost
|
||||||
|
|
||||||
[Yunohost project](https://yunohost.org/#/)
|
[Yunohost project](https://yunohost.org/#/)
|
||||||
|
|
||||||
|
...Description...
|
||||||
|
|
||||||
https://lut.im
|
https://lut.im
|
||||||
|
|
||||||
|
Le script installe le paquet *perlmagick* et le module perl *carton* via cpan.
|
|
@ -1,3 +0,0 @@
|
||||||
# Mise a jour de leed toutes les 2 heures.
|
|
||||||
|
|
||||||
0 */2 * * * __ADMIN__ wget -q -O - "https://__DOMAIN____PATH__/action.php?action=synchronize&code=__CODESYNC__" > /dev/null 2>&1
|
|
11
conf/cron_lutim
Normal file
11
conf/cron_lutim
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Génération des statistiques. Tous les jours, à 5h.
|
||||||
|
0 5 * * * www-data carton exec script/lutim cron stats && carton exec hypnotoad script/lutim
|
||||||
|
|
||||||
|
# Suppression des adresses IP obsolètes. Tous les jours, à 6h.
|
||||||
|
0 6 * * * www-data carton exec script/lutim cron cleanbdd
|
||||||
|
|
||||||
|
# Suppression des images dont le délai a expiré. Tous les jours, à 6h.
|
||||||
|
0 6 * * * www-data carton exec script/lutim cron cleanfiles
|
||||||
|
|
||||||
|
# Vérification de l'occupation du dossier des images. Tous les jours, à 7h.
|
||||||
|
0 7 * * * www-data carton exec script/lutim cron watch
|
3
conf/lutim.default
Normal file
3
conf/lutim.default
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# LDIR is the path where you installed Lutim
|
||||||
|
# It has to end with a final /
|
||||||
|
LDIR=__FINALPATH__
|
|
@ -1,19 +1,72 @@
|
||||||
location PATHTOCHANGE {
|
#location __PATH__ {
|
||||||
alias ALIASTOCHANGE ;
|
# alias __FINALPATH__;
|
||||||
if ($scheme = http) {
|
# if ($scheme = http) {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
# rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
# }
|
||||||
index index.php;
|
# index index.php index.html index.htm;
|
||||||
try_files $uri $uri/ index.php;
|
# default_type text/html;
|
||||||
location ~ [^/]\.php(/|$) {
|
# location ~ [^/]\.php(/|$) {
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
# fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
# fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||||
fastcgi_index index.php;
|
# fastcgi_index index.php;
|
||||||
include fastcgi_params;
|
# include fastcgi_params;
|
||||||
fastcgi_param REMOTE_USER $remote_user;
|
# fastcgi_param REMOTE_USER $remote_user;
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
# fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# Include SSOWAT user panel.
|
||||||
|
# include conf.d/yunohost_panel.conf.inc;
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#server {
|
||||||
|
# listen 80;
|
||||||
|
# root /path/to/lutim/public;
|
||||||
|
|
||||||
|
# This is important for user's privacy !
|
||||||
|
# access_log off;
|
||||||
|
# error_log /var/log/nginx/lutim.error.log;
|
||||||
|
|
||||||
|
# This is important ! Make it OK with your Lutim configuration
|
||||||
|
client_max_body_size 40M;
|
||||||
|
|
||||||
|
location ~* ^/(img|css|font|js)/ {
|
||||||
|
try_files $uri @lutim;
|
||||||
|
add_header Expires "Thu, 31 Dec 2037 23:55:55 GMT";
|
||||||
|
add_header Cache-Control "public, max-age=315360000";
|
||||||
|
|
||||||
|
# HTTPS only header, improves security
|
||||||
|
#add_header Strict-Transport-Security "max-age=15768000";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# location / {
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
location __PATH__ {
|
||||||
}
|
#alias __FINALPATH__;
|
||||||
|
try_files $uri @lutim;
|
||||||
|
|
||||||
|
# HTTPS only header, improves security
|
||||||
|
#add_header Strict-Transport-Security "max-age=15768000";
|
||||||
|
}
|
||||||
|
|
||||||
|
location @lutim {
|
||||||
|
# Adapt this to your configuration
|
||||||
|
# My advice: put a varnish between nginx and Lutim, it's really useful when images are widel$
|
||||||
|
proxy_pass http://127.0.0.1:8080;
|
||||||
|
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
|
# If you want to log the remote port of the image senders, you'll need that
|
||||||
|
proxy_set_header X-Remote-Port $remote_port;
|
||||||
|
|
||||||
|
# Lutim reads this header and understands that the current session is actually HTTPS.
|
||||||
|
# Enable it if you run a HTTPS server (in this case, don't forgot to change the listen port $
|
||||||
|
#proxy_set_header X-Forwarded-Proto https;
|
||||||
|
|
||||||
|
# We expect the downsteam servers to redirect to the right hostname, so don't do any rewrite$
|
||||||
|
proxy_redirect off;
|
||||||
|
}
|
||||||
|
#}
|
|
@ -6,10 +6,11 @@
|
||||||
"fr": "Leed est un agrégateur RSS minimaliste qui permet la consultation de flux RSS de manière rapide et non intrusive."
|
"fr": "Leed est un agrégateur RSS minimaliste qui permet la consultation de flux RSS de manière rapide et non intrusive."
|
||||||
Lutim est un logiciel d’hébergement d’images. Il s’agit aussi du nom du logiciel (libre) qui fournit ce service.
|
Lutim est un logiciel d’hébergement d’images. Il s’agit aussi du nom du logiciel (libre) qui fournit ce service.
|
||||||
},
|
},
|
||||||
"developer": {
|
"version": "0.6",
|
||||||
|
"url": "https://lut.im",
|
||||||
|
"maintainer": {
|
||||||
"name": "Maniack Crudelis",
|
"name": "Maniack Crudelis",
|
||||||
"email": "maniack@crudelis.fr",
|
"email": "maniackc_dev@crudelis.fr"
|
||||||
"url": "https://lut.im/"
|
|
||||||
},
|
},
|
||||||
"multi_instance": "true",
|
"multi_instance": "true",
|
||||||
"arguments": {
|
"arguments": {
|
||||||
|
|
|
@ -29,9 +29,6 @@ sudo mkdir -p $final_path
|
||||||
sudo cp -a ../sources/lutim-master/* $final_path
|
sudo cp -a ../sources/lutim-master/* $final_path
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/lutim.conf
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/lutim.conf
|
||||||
|
|
||||||
# Set right permissions for curl install
|
|
||||||
# sudo chown -R www-data: $final_path
|
|
||||||
|
|
||||||
# Installation du module perl carton
|
# Installation du module perl carton
|
||||||
yes | sudo cpan Carton
|
yes | sudo cpan Carton
|
||||||
# Installation de perlmagick, interface perl pour imagemagick
|
# Installation de perlmagick, interface perl pour imagemagick
|
||||||
|
@ -43,30 +40,26 @@ cd $final_path
|
||||||
sudo carton install
|
sudo carton install
|
||||||
|
|
||||||
## Copie et configuration du fichier de conf.
|
## Copie et configuration du fichier de conf.
|
||||||
|
sudo cp ../conf/lutim.conf.template $final_path/lutim.conf
|
||||||
|
sudo sed -i "s@__DOMAIN__@$domain@g" $final_path/lutim.conf
|
||||||
|
|
||||||
# Mise en place des scripts init
|
# Mise en place des scripts init
|
||||||
sudo cp $final_path/utilities/lutim.init /etc/init.d/lutim
|
sudo cp ../sources/lutim-master/utilities/lutim.init /etc/init.d/lutim
|
||||||
sudo cp $final_path/utilities/lutim.default /etc/default/lutim
|
sudo cp ../conf/lutim.default /etc/default/lutim
|
||||||
sudo chmod +x /etc/init.d/lutim
|
sudo chmod +x /etc/init.d/lutim
|
||||||
chown root:root /etc/init.d/lutim /etc/default/lutim
|
chown root:root /etc/init.d/lutim /etc/default/lutim
|
||||||
## vim /etc/default/lutim
|
sudo sed -i "s@__FINALPATH__@$final_path@g" /etc/default/lutim
|
||||||
|
|
||||||
## /etc/init.d/lutim start
|
|
||||||
|
|
||||||
## Démarrage auto des scripts init
|
## Démarrage auto des scripts init
|
||||||
|
sudo update-rc.d lutim defaults
|
||||||
|
# sudo update-rc.d -f lutim remove
|
||||||
|
|
||||||
|
# Change variables in nginx configuration
|
||||||
|
sudo sed -i "s@__PATH__@$path@g" /etc/nginx/conf.d/$domain.d/lutim.conf
|
||||||
|
sudo sed -i "s@__FINALPATH__@$final_path/@g" /etc/nginx/conf.d/$domain.d/lutim.conf
|
||||||
|
|
||||||
## Voir les crons et les mettre en place.
|
## Voir les crons et les mettre en place.
|
||||||
|
|
||||||
## Reverse proxy nginx à configurer
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Change variables in lutim configuration
|
|
||||||
sudo sed -i "s@PATHTOCHANGE@$path@g" /etc/nginx/conf.d/$domain.d/lutim.conf
|
|
||||||
sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" /etc/nginx/conf.d/$domain.d/lutim.conf
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Files owned by root, www-data can just read
|
# Files owned by root, www-data can just read
|
||||||
# sudo find $final_path -type f | xargs sudo chmod 644
|
# sudo find $final_path -type f | xargs sudo chmod 644
|
||||||
|
@ -74,6 +67,8 @@ sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" /etc/nginx/conf.d/$domain.d/lutim.c
|
||||||
# sudo chown -R root: $final_path
|
# sudo chown -R root: $final_path
|
||||||
# www-data can write on plugins and cache
|
# www-data can write on plugins and cache
|
||||||
# sudo chown -R www-data $final_path/cache $final_path/plugins
|
# sudo chown -R www-data $final_path/cache $final_path/plugins
|
||||||
|
# Set right permissions
|
||||||
|
sudo chown -R www-data: $final_path
|
||||||
|
|
||||||
# Make app public or private
|
# Make app public or private
|
||||||
sudo yunohost app setting lutim is_public -v "$is_public"
|
sudo yunohost app setting lutim is_public -v "$is_public"
|
||||||
|
|
Loading…
Reference in a new issue