1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rspamdui_ynh.git synced 2024-09-03 20:16:32 +02:00

First import

This commit is contained in:
Julien Malik 2016-01-20 12:20:03 +01:00
commit 9ee20f6378
6 changed files with 95 additions and 0 deletions

4
README.md Normal file
View file

@ -0,0 +1,4 @@
Rspamd Web UI for YunoHost
-------------------------
https://rspamd.com/webui/

9
conf/nginx.conf Normal file
View file

@ -0,0 +1,9 @@
location PATHTOCHANGE {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://localhost:11334/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}

38
manifest.json Normal file
View file

@ -0,0 +1,38 @@
{
"name": "Rspamd UI",
"id": "rspamdui",
"description": {
"en": "Simple control interface for rspamd spam filtering system",
"fr": "Simple control interface for rspamd spam filtering system"
},
"url": "https://rspamd.com/webui",
"maintainer": {
"name": "ju",
"email": "ju@paraiso.me"
},
"multi_instance": "false",
"services": [
"nginx"
],
"arguments": {
"install": [
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for Rspamd UI"
},
"example": "domain.org"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for Rspamd UI"
},
"example": "/rspamd",
"default": "/rspamd"
}
]
}
}

21
scripts/install Normal file
View file

@ -0,0 +1,21 @@
#!/bin/bash
# Retrieve arguments
domain=$1
path=$2
sudo yunohost app checkurl $domain$path -a rspamdui
if [[ ! $? -eq 0 ]]; then
exit 1
fi
# Check port availability
sudo yunohost app checkport 11334
if [[ ! $? -eq 0 ]]; then
exit 1
fi
# Configure Nginx and reload
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/rspamdui.conf
sudo service nginx reload

7
scripts/remove Normal file
View file

@ -0,0 +1,7 @@
#!/bin/bash
domain=$(sudo yunohost app setting transmission domain)
sudo rm /etc/nginx/conf.d/$domain.d/transmission.conf
sudo service nginx reload
sudo yunohost app ssowatconf

16
scripts/upgrade Normal file
View file

@ -0,0 +1,16 @@
#!/bin/bash
# Retrieve arguments
domain=$(sudo yunohost app setting transmission domain)
path=$(sudo yunohost app setting transmission path)
# Check port availability
sudo yunohost app checkport 11334
if [[ ! $? -eq 0 ]]; then
exit 1
fi
# Configure Nginx and reload
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/rspamdui.conf
sudo service nginx reload