mirror of
https://github.com/YunoHost-Apps/cinny_ynh.git
synced 2024-09-03 18:16:13 +02:00
[fix] Update arguments passed to the scripts
This commit is contained in:
parent
b822ff2cba
commit
760163f823
5 changed files with 17 additions and 11 deletions
|
@ -3,12 +3,12 @@
|
||||||
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
app=ynhexample
|
# The last argument is the app instance name
|
||||||
|
app=${!#}
|
||||||
|
|
||||||
# The parameter $1 is the backup directory location
|
# The first argument is the backup directory location for the app
|
||||||
# which will be compressed afterward
|
# from where the script is executed and which will be compressed afterward
|
||||||
backup_dir=$1/apps/$app
|
backup_dir=$1
|
||||||
sudo mkdir -p $backup_dir
|
|
||||||
|
|
||||||
# Backup sources & data
|
# Backup sources & data
|
||||||
sudo cp -a /var/www/$app/. $backup_dir/sources
|
sudo cp -a /var/www/$app/. $backup_dir/sources
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
app=ynhexample
|
# The last argument is the app instance name
|
||||||
|
app=${!#}
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$1
|
domain=$1
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
app=ynhexample
|
|
||||||
|
# The last argument is the app instance name
|
||||||
|
app=${!#}
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$(sudo yunohost app setting $app domain)
|
domain=$(sudo yunohost app setting $app domain)
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
app=ynhexample
|
# The last argument is the app instance name
|
||||||
|
app=${!#}
|
||||||
|
|
||||||
# The parameter $1 is the uncompressed restore directory location
|
# The first argument is the backup directory location of the app
|
||||||
backup_dir=$1/apps/$app
|
# from where the script is executed
|
||||||
|
backup_dir=$1
|
||||||
|
|
||||||
# Restore sources & data
|
# Restore sources & data
|
||||||
sudo cp -a $backup_dir/sources/. /var/www/$app
|
sudo cp -a $backup_dir/sources/. /var/www/$app
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
app=ynhexample
|
# The last argument is the app instance name
|
||||||
|
app=${!#}
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$(sudo yunohost app setting $app domain)
|
domain=$(sudo yunohost app setting $app domain)
|
||||||
|
|
Loading…
Reference in a new issue