mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
Use ynh helpers
This commit is contained in:
parent
6faa633b1e
commit
c13da5e9e0
2 changed files with 8 additions and 11 deletions
|
@ -23,11 +23,7 @@ domain=$(ynh_app_setting_get $app domain)
|
|||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
workdir=$(pwd)
|
||||
cd $final_path
|
||||
tar -czf $workdir/rocket.chat.gtar .
|
||||
cd $workdir
|
||||
ynh_backup ./rocket.chat.gtar
|
||||
ynh_backup "$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE CONFIGURATION
|
||||
|
|
|
@ -53,24 +53,25 @@ id -u $serviceuser || sudo useradd -d "$final_path" -M $serviceuser
|
|||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
|
||||
ynh_restore
|
||||
|
||||
#=================================================
|
||||
# RELOAD THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
sudo cp -a "conf/nginx" "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
sudo systemctl reload nginx
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE SYSTEMD CONFIGURATION
|
||||
# RELOAD AND ENABLE THE SYSTEMD CONFIGURATION
|
||||
#=================================================
|
||||
sudo cp -a "conf/service" "/etc/systemd/system/rocketchat.service"
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable rocketchat
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
# RESTORE PERMISSIONS IN THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
sudo tar -xzf ./rocket.chat.gtar -C $final_path
|
||||
sudo chown -R $serviceuser: $final_path
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue