mirror of
https://github.com/YunoHost-Apps/webmin_ynh.git
synced 2024-09-03 20:36:08 +02:00
first commit
This commit is contained in:
parent
5b8d34a3d1
commit
dae2e10a88
5 changed files with 102 additions and 0 deletions
7
conf/nginx.conf
Normal file
7
conf/nginx.conf
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
location PATHTOCHANGE {
|
||||||
|
proxy_pass http://127.0.0.1:10000;
|
||||||
|
|
||||||
|
# Include SSOWAT user panel.
|
||||||
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
|
more_clear_input_headers 'Accept-Encoding';
|
||||||
|
}
|
40
manifest.json
Normal file
40
manifest.json
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
"name": "Webmin",
|
||||||
|
"id": "webmin",
|
||||||
|
"description": {
|
||||||
|
"en": "Webmin",
|
||||||
|
"fr": "Webmin"
|
||||||
|
},
|
||||||
|
"developer": {
|
||||||
|
"name": "",
|
||||||
|
"email": "",
|
||||||
|
"url": "http://www.webmin.com"
|
||||||
|
},
|
||||||
|
"multi_instance": "false",
|
||||||
|
"arguments": {
|
||||||
|
"install" : [
|
||||||
|
{
|
||||||
|
"name": "domain",
|
||||||
|
"ask": {
|
||||||
|
"en": "Choose a domain for Webmin"
|
||||||
|
},
|
||||||
|
"example": "domain.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "path",
|
||||||
|
"ask": {
|
||||||
|
"en": "Choose a path for Webmin"
|
||||||
|
},
|
||||||
|
"example": "/webmin",
|
||||||
|
"default": "/webmin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "admin",
|
||||||
|
"ask": {
|
||||||
|
"en": "Choose the Webmin administrator (must be an existing YunoHost user)"
|
||||||
|
},
|
||||||
|
"example": "homer"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
44
scripts/install
Normal file
44
scripts/install
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Retrieve arguments
|
||||||
|
domain=$1
|
||||||
|
path=$2
|
||||||
|
user=$3
|
||||||
|
|
||||||
|
# Remove trailing "/" for next commands
|
||||||
|
path=${path%/}
|
||||||
|
|
||||||
|
# Check user parameter
|
||||||
|
sudo yunohost user list --json | grep -q "\"username\": \"$user\""
|
||||||
|
if [[ ! $? -eq 0 ]]; then
|
||||||
|
echo "Wrong user"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sudo yunohost app setting webmin admin_user -v $user
|
||||||
|
|
||||||
|
# Check domain/path availability
|
||||||
|
sudo yunohost app checkurl $domain$path -a webmin
|
||||||
|
if [[ ! $? -eq 0 ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
sudo sh -c "echo 'deb http://download.webmin.com/download/repository sarge contrib' > s"
|
||||||
|
sudo sh -c "echo 'deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib' >> /etc/apt/sources.list.d/webmin.conf"
|
||||||
|
|
||||||
|
cd /root
|
||||||
|
sudo wget http://www.webmin.com/jcameron-key.asc
|
||||||
|
sudo apt-key add jcameron-key.asc
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install webmin
|
||||||
|
|
||||||
|
sudo addgroup tifred root
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||||
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/webmin.conf
|
||||||
|
|
||||||
|
|
||||||
|
# Reload Nginx and regenerate SSOwat conf
|
||||||
|
sudo service nginx reload
|
||||||
|
sudo yunohost app ssowatconf
|
6
scripts/remove
Normal file
6
scripts/remove
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo delgroup tifred root
|
||||||
|
sudo apt-get remove --purge webmin
|
||||||
|
sudo rm -r /etc/apt/sources.list.d/webmin.conf
|
||||||
|
|
5
scripts/upgrade
Normal file
5
scripts/upgrade
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo service nginx reload
|
||||||
|
sudo yunohost app ssowatconf
|
||||||
|
|
Loading…
Add table
Reference in a new issue