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

fixing some stuff

This commit is contained in:
realitygaps 2016-04-29 21:02:20 +02:00
parent bf4b4a3deb
commit fb42f249a4
2 changed files with 4 additions and 22 deletions

View file

@ -19,14 +19,6 @@
}, },
"example": "domain.org" "example": "domain.org"
}, },
{
"name": "path",
"ask": {
"en": "Choose a path for Rocketchat"
},
"example": "/",
"default": "/"
},
{ {
"name": "public_site", "name": "public_site",
"ask": { "ask": {

View file

@ -2,11 +2,10 @@
#Retrieve arguments #Retrieve arguments
domain=$1 domain=$1
path=$2 is_public=$2
is_public=$3
# Check domain/path availability # Check domain/path availability
sudo yunohost app checkurl $domain/$path -a rocketchat sudo yunohost app checkurl $domain -a rocketchat
if [[ ! $? -eq 0 ]]; then if [[ ! $? -eq 0 ]]; then
exit 1 exit 1
fi fi
@ -14,9 +13,6 @@ fi
# Save specific settings # Save specific settings
sudo yunohost app setting rocketchat is_public -v $is_public sudo yunohost app setting rocketchat is_public -v $is_public
# Remove trailing "/" for next commands
path=${path%/}
#Install dependencies #Install dependencies
@ -30,17 +26,11 @@ sudo npm install -g n
# Meteor needs at least this version of node to work. # Meteor needs at least this version of node to work.
sudo n 0.10.40 sudo n 0.10.40
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf* sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
sed -i "s@CHANGEMETOROOTURL@$domain\/$path/@g" ../conf/Rocketchat.service sed -i "s@CHANGEMETOROOTURL@$domain/@g" ../conf/Rocketchat.service
if [ "$path" = "" ]; sudo cp ../conf/nginx.conf-nosub /etc/nginx/conf.d/$domain.d/rocketchat.conf
then
sudo cp ../conf/nginx.conf-nosub /etc/nginx/conf.d/$domain.d/rocketchat.conf
else
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/rocketchat.conf
fi
pkgdir=$(pwd) pkgdir=$(pwd)