mirror of
https://github.com/YunoHost-Apps/scrumblr_ynh.git
synced 2024-09-03 20:16:29 +02:00
Create remove
This commit is contained in:
parent
293811682d
commit
e438def783
1 changed files with 28 additions and 0 deletions
28
scripts/remove
Normal file
28
scripts/remove
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
|
||||
|
||||
# Retrieve app settings
|
||||
domain=$(ynh_app_setting_get "$app" domain)
|
||||
|
||||
# Stop haste
|
||||
sudo systemctl stop "$app".service
|
||||
|
||||
# Remove sources
|
||||
sudo rm -rf "/opt/"${app}
|
||||
|
||||
# Remove nginx configuration file
|
||||
[[ -n $domain ]] && sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||
|
||||
# Remove init script
|
||||
sudo systemctl disable "$app".service
|
||||
sudo rm -f /etc/systemd/system/"$app".service
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
# Remove monitor
|
||||
sudo yunohost service remove "$app"
|
||||
|
||||
# Reload nginx service
|
||||
sudo systemctl reload nginx.service
|
Loading…
Add table
Reference in a new issue