mirror of
https://github.com/YunoHost-Apps/chtickynotes_ynh.git
synced 2024-09-03 18:15:57 +02:00
25 lines
623 B
Text
25 lines
623 B
Text
|
#!/bin/bash
|
||
|
app=chtickynotes
|
||
|
|
||
|
# Retrieve arguments
|
||
|
domain=$(sudo yunohost app setting $app domain)
|
||
|
path=$(sudo yunohost app setting $app path)
|
||
|
|
||
|
# Remove trailing "/" for next commands
|
||
|
path=${path%/}
|
||
|
|
||
|
# Copy source files
|
||
|
final_path=/var/www/$app
|
||
|
sudo mkdir -p $final_path
|
||
|
sudo cp -a ../sources/* $final_path
|
||
|
|
||
|
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||
|
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||
|
sed -i "s@WWWPATH@$final_path@g" ../conf/nginx.conf
|
||
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||
|
|
||
|
# Restart services
|
||
|
sudo service nginx reload
|
||
|
sudo yunohost app ssowatconf
|
||
|
|