mirror of
https://github.com/YunoHost-Apps/jappix_ynh.git
synced 2024-09-03 19:26:19 +02:00
[enh] add name choice & cleaner remove
This commit is contained in:
parent
a3ca0d4452
commit
c6ec69df8e
3 changed files with 17 additions and 8 deletions
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<jappix xmlns="jappix:conf:main">
|
||||
<name>YunoJappix</name>
|
||||
<name>CHANGENAME</name>
|
||||
<desc>a free social network</desc>
|
||||
<owner_name></owner_name>
|
||||
<owner_website></owner_website>
|
||||
<legal></legal>
|
||||
<language>CHANGELANG</language>
|
||||
<resource>YunoJappix</resource>
|
||||
<resource>CHANGENAME</resource>
|
||||
<lock>on</lock>
|
||||
<anonymous>off</anonymous>
|
||||
<http_auth>on</http_auth>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
# Retrieve arguments
|
||||
domain=$1
|
||||
path=$2
|
||||
language=$3
|
||||
name=$3
|
||||
language=$4
|
||||
|
||||
# Check domain/path availability
|
||||
sudo yunohost app checkurl $domain$path -a jappix
|
||||
|
@ -15,10 +16,10 @@ fi
|
|||
path=${path%/}
|
||||
|
||||
# Copy files to the right place
|
||||
final_path=/var/www/jappix
|
||||
sudo mkdir -p $final_path
|
||||
sudo cp -r ../source/* $final_path
|
||||
sudo cp ../conf/*.xml $final_path/store/conf/
|
||||
final_path=/var/www/jappix
|
||||
sudo mkdir -p $final_path
|
||||
sudo cp -r ../source/* $final_path
|
||||
sudo cp ../conf/*.xml $final_path/store/conf/
|
||||
|
||||
# Set permissions to jappix directory
|
||||
sudo chown -R www-data: $final_path
|
||||
|
@ -27,7 +28,7 @@ sudo chown -R www-data: $final_path
|
|||
sudo sed -i "s@PATHTOCHANGE2@$path@g" ../conf/nginx.conf
|
||||
|
||||
if [ -z "$path" ]; then
|
||||
path="/"
|
||||
path="/"
|
||||
fi
|
||||
|
||||
sudo ls $final_path/i18n/$language > /dev/null 2>&1
|
||||
|
@ -45,6 +46,7 @@ sudo sed -i "s@PATHTOCHANGE@$path@g" $final_path/store/conf/main.xml
|
|||
sudo sed -i "s@PATHTOCHANGE@$path@g" $final_path/store/conf/hosts.xml
|
||||
sudo sed -i "s@DOMAINTOCHANGE@$domain@g" $final_path/store/conf/main.xml
|
||||
sudo sed -i "s@CHANGELANG@$language@g" $final_path/store/conf/main.xml
|
||||
sudo sed -i "s@CHANGENAME@$name@g" $final_path/store/conf/main.xml
|
||||
sudo sed -i "s@DOMAINTOCHANGE@$domain@g" $final_path/store/conf/hosts.xml
|
||||
|
||||
# Reload Nginx and regenerate SSOwat conf
|
||||
|
|
|
@ -3,3 +3,10 @@ domain=$(sudo yunohost app setting jappix domain)
|
|||
|
||||
sudo rm -rf /var/www/jappix
|
||||
sudo rm -f /etc/nginx/conf.d/$domain.d/jappix.conf
|
||||
|
||||
sudo yunohost app setting jappix domain -d
|
||||
sudo yunohost app setting jappix path -d
|
||||
sudo yunohost app setting jappix language -d
|
||||
|
||||
sudo service nginx reload
|
||||
sudo yunohost app ssowatconf
|
||||
|
|
Loading…
Add table
Reference in a new issue