mirror of
https://github.com/YunoHost-Apps/jenkins_ynh.git
synced 2024-09-03 19:26:18 +02:00
[enh] cleanup
This commit is contained in:
parent
c9cc1a6d0d
commit
929d05713c
4 changed files with 34 additions and 5 deletions
|
@ -28,6 +28,15 @@
|
|||
},
|
||||
"example": "/jenkins",
|
||||
"default": "/jenkins"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"ask": {
|
||||
"en": "Is it a public site?",
|
||||
"fr": "Est-ce un site public ?"
|
||||
},
|
||||
"choices": ["Yes", "No"],
|
||||
"default": "Yes"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# Retrieve arguments
|
||||
domain=$1
|
||||
path=$2
|
||||
is_public=$3
|
||||
|
||||
sudo yunohost app checkport 8080
|
||||
if [[ ! $? -eq 0 ]]; then
|
||||
|
@ -32,5 +33,12 @@ sudo yunohost service add jenkins -l /var/log/jenkins/jenkins.log
|
|||
echo "Nginx configuration (sso disabled)..."
|
||||
sed -i "s@YNH_LOCATION@$path@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/jenkins.conf
|
||||
|
||||
sudo yunohost app setting jenkins is_public -v $is_public
|
||||
if [ "$is_public" = "Yes" ];
|
||||
then
|
||||
sudo yunohost app setting jenkins unprotected_uris -v "/"
|
||||
fi
|
||||
|
||||
sudo service nginx reload
|
||||
sudo yunohost app ssowatconf
|
||||
|
|
|
@ -2,13 +2,15 @@
|
|||
|
||||
domain=$(sudo yunohost app setting jenkins domain)
|
||||
|
||||
sudo rm /etc/nginx/conf.d/$domain/jenkins.conf
|
||||
sudo yunohost ssowatconf
|
||||
sudo service nginx reload
|
||||
|
||||
sudo yunohost service remove ynh-jenkins
|
||||
sudo rm /etc/nginx/conf.d/$domain.d/jenkins.conf
|
||||
|
||||
sudo apt-get purge jenkins
|
||||
sudo rm /etc/apt/sources.list.d/jenkins.list
|
||||
# TODO remove repo key
|
||||
sudo apt-get update
|
||||
|
||||
sudo yunohost service remove jenkins
|
||||
|
||||
sudo yunohost app ssowatconf
|
||||
sudo service nginx reload
|
||||
|
||||
|
|
|
@ -4,9 +4,19 @@
|
|||
domain=$(sudo yunohost app setting jenkins domain)
|
||||
path=$(sudo yunohost app setting jenkins path)
|
||||
path=${path%/}
|
||||
is_public=$(sudo yunohost app setting jenkins is_public)
|
||||
|
||||
sed -i "s@YNH_LOCATION@$path@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/jenkins.conf
|
||||
|
||||
|
||||
if [ "$is_public" = "Yes" ];
|
||||
then
|
||||
sudo yunohost app setting jenkins unprotected_uris -v "/"
|
||||
else
|
||||
sudo yunohost app setting jenkins unprotected_uris -d
|
||||
fi
|
||||
|
||||
sudo service nginx reload
|
||||
sudo yunohost app ssowatconf
|
||||
|
||||
|
|
Loading…
Reference in a new issue