mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
test: make provisioning a no-op if already configured properly
This commit is contained in:
parent
b7e3913fd7
commit
6b9a4359ff
2 changed files with 7 additions and 7 deletions
2
Vagrantfile
vendored
2
Vagrantfile
vendored
|
@ -42,13 +42,13 @@ Vagrant.configure("2") do |config|
|
||||||
# Stop on first error
|
# Stop on first error
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if ! [[ -f /etc/yunohost/installed ]]; then
|
||||||
# Upgrade Yunohost and the system packages (disabled)
|
# Upgrade Yunohost and the system packages (disabled)
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get upgrade --yes
|
sudo apt-get upgrade --yes
|
||||||
sudo apt-get dist-upgrade --yes
|
sudo apt-get dist-upgrade --yes
|
||||||
|
|
||||||
# Finish Yunohost installation
|
# Finish Yunohost installation
|
||||||
if ! [[ -f /etc/yunohost/installed ]]; then
|
|
||||||
sudo yunohost tools postinstall --domain ${DOMAIN} --password ${YUNOHOST_ADMIN_PASSWORD} --ignore-dyndns
|
sudo yunohost tools postinstall --domain ${DOMAIN} --password ${YUNOHOST_ADMIN_PASSWORD} --ignore-dyndns
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
2
test.sh
2
test.sh
|
@ -104,7 +104,7 @@ function setup() {
|
||||||
|
|
||||||
if (vagrant snapshot list | grep 'yunohost-jessie-pristine' > /dev/null); then
|
if (vagrant snapshot list | grep 'yunohost-jessie-pristine' > /dev/null); then
|
||||||
echo "--- Restoring Vagrant snapshot ---"
|
echo "--- Restoring Vagrant snapshot ---"
|
||||||
vagrant snapshot restore --no-provision yunohost-jessie-pristine
|
vagrant snapshot restore yunohost-jessie-pristine
|
||||||
else
|
else
|
||||||
echo "--- Provisioning Vagrant box ---"
|
echo "--- Provisioning Vagrant box ---"
|
||||||
vagrant up --provision
|
vagrant up --provision
|
||||||
|
|
Loading…
Add table
Reference in a new issue