mirror of
https://github.com/YunoHost-Apps/mastodon_ynh.git
synced 2024-09-03 19:46:02 +02:00
[enh] final_path on nginx.conf
This commit is contained in:
parent
9085da20f0
commit
d1cd27f009
2 changed files with 11 additions and 9 deletions
|
@ -24,7 +24,7 @@ final_path="/opt/${app}"
|
||||||
ynh_backup "$final_path" "sources" 1
|
ynh_backup "$final_path" "sources" 1
|
||||||
|
|
||||||
# final_path on nginx
|
# final_path on nginx
|
||||||
sudo sed -i "s@$final_path@__FINALPATH__@g" ../conf/nginx.conf
|
sudo sed -i "s@$final_path@__FINALPATH__@g" /etc/nginx/conf.d/${domain}.d/${app}.conf
|
||||||
|
|
||||||
# Copy the nginx conf files
|
# Copy the nginx conf files
|
||||||
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
|
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
|
||||||
|
|
|
@ -150,7 +150,9 @@ ynh_secure_remove $final_path/mastodon_db.sql
|
||||||
# Create symlink for ruby
|
# Create symlink for ruby
|
||||||
sudo ln -s /opt/mastodon/.rbenv/versions/2.4.1/bin/ruby /usr/bin/ruby || true
|
sudo ln -s /opt/mastodon/.rbenv/versions/2.4.1/bin/ruby /usr/bin/ruby || true
|
||||||
|
|
||||||
# Restore nginx configuration files
|
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||||
|
sudo sed -i "s@__PATH__@$app@g" ./nginx.conf
|
||||||
|
sudo sed -i "s@__FINALPATH__@$final_path/@g" ./nginx.conf
|
||||||
sudo cp -a ./nginx.conf "$nginx_conf"
|
sudo cp -a ./nginx.conf "$nginx_conf"
|
||||||
# Restore crontab
|
# Restore crontab
|
||||||
sudo cp -a ./cron.conf "$crontab_conf"
|
sudo cp -a ./cron.conf "$crontab_conf"
|
||||||
|
|
Loading…
Add table
Reference in a new issue