mirror of
https://github.com/YunoHost-Apps/phpsysinfo_ynh.git
synced 2024-09-03 19:56:43 +02:00
Add $app and set -eu
This commit is contained in:
parent
68a75877f0
commit
e7ec50b2a2
3 changed files with 21 additions and 3 deletions
|
@ -1,8 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
|
||||
# Define app
|
||||
app=phpsysinfo
|
||||
|
||||
# Source YunoHost helpers
|
||||
. /usr/share/yunohost/helpers
|
||||
|
||||
# Retrieve arguments
|
||||
domain=$1
|
||||
path=$2
|
||||
|
@ -22,7 +28,7 @@ if [[ ! $? -eq 0 ]]; then
|
|||
fi
|
||||
|
||||
# Copy files to the right place
|
||||
final_path=/var/www/phpsysinfo
|
||||
final_path=/var/www/$app
|
||||
sudo mkdir -p $final_path
|
||||
sudo cp -a ../sources/* $final_path
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
|
||||
# Source YunoHost helpers
|
||||
. /usr/share/yunohost/helpers
|
||||
|
||||
# Define app
|
||||
app=phpsysinfo
|
||||
|
||||
|
@ -10,7 +16,7 @@ admin=$(ynh_app_setting_get "$app" admin)
|
|||
is_public=$(ynh_app_setting_get "$app" is_public)
|
||||
|
||||
# Remove sources
|
||||
sudo rm -rf /var/www/phpsysinfo
|
||||
sudo rm -rf /var/www/$app
|
||||
|
||||
# Remove configuration files
|
||||
sudo rm -f /etc/nginx/conf.d/$domain.d/phpsysinfo.conf
|
||||
|
|
|
@ -1 +1,7 @@
|
|||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
|
||||
# Source YunoHost helpers
|
||||
. /usr/share/yunohost/helpers
|
Loading…
Add table
Reference in a new issue