mirror of
https://github.com/friendica/docker
synced 2025-03-04 18:13:47 +01:00
fix indents
This commit is contained in:
parent
b58fda500c
commit
06d228b850
11 changed files with 157 additions and 157 deletions
|
@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
installed_version="$(cat /var/www/html/VERSION)"
|
installed_version="$(cat /var/www/html/VERSION)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
image_version="$(cat /usr/src/friendica/VERSION)"
|
image_version="$(cat /usr/src/friendica/VERSION)"
|
||||||
|
|
||||||
# no downgrading possible
|
# no downgrading possible
|
||||||
if version_greater "$installed_version" "$image_version"; then
|
if version_greater "$installed_version" "$image_version"; then
|
||||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup_ssmtp
|
setup_ssmtp
|
||||||
|
|
||||||
# check it just in case the version is greater
|
# check it just in case the version is greater
|
||||||
if version_greater "$image_version" "$installed_version"; then
|
if version_greater "$image_version" "$installed_version"; then
|
||||||
echo "Initializing Friendica $image_version ..."
|
echo "Initializing Friendica $image_version ..."
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0.0" ]; then
|
if [ "$installed_version" != "0.0.0.0" ]; then
|
||||||
|
|
|
@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
installed_version="$(cat /var/www/html/VERSION)"
|
installed_version="$(cat /var/www/html/VERSION)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
image_version="$(cat /usr/src/friendica/VERSION)"
|
image_version="$(cat /usr/src/friendica/VERSION)"
|
||||||
|
|
||||||
# no downgrading possible
|
# no downgrading possible
|
||||||
if version_greater "$installed_version" "$image_version"; then
|
if version_greater "$installed_version" "$image_version"; then
|
||||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup_ssmtp
|
setup_ssmtp
|
||||||
|
|
||||||
# check it just in case the version is greater
|
# check it just in case the version is greater
|
||||||
if version_greater "$image_version" "$installed_version"; then
|
if version_greater "$image_version" "$installed_version"; then
|
||||||
echo "Initializing Friendica $image_version ..."
|
echo "Initializing Friendica $image_version ..."
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0.0" ]; then
|
if [ "$installed_version" != "0.0.0.0" ]; then
|
||||||
|
|
|
@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
installed_version="$(cat /var/www/html/VERSION)"
|
installed_version="$(cat /var/www/html/VERSION)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
image_version="$(cat /usr/src/friendica/VERSION)"
|
image_version="$(cat /usr/src/friendica/VERSION)"
|
||||||
|
|
||||||
# no downgrading possible
|
# no downgrading possible
|
||||||
if version_greater "$installed_version" "$image_version"; then
|
if version_greater "$installed_version" "$image_version"; then
|
||||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup_ssmtp
|
setup_ssmtp
|
||||||
|
|
||||||
# check it just in case the version is greater
|
# check it just in case the version is greater
|
||||||
if version_greater "$image_version" "$installed_version"; then
|
if version_greater "$image_version" "$installed_version"; then
|
||||||
echo "Initializing Friendica $image_version ..."
|
echo "Initializing Friendica $image_version ..."
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0.0" ]; then
|
if [ "$installed_version" != "0.0.0.0" ]; then
|
||||||
|
|
|
@ -3,10 +3,10 @@ set -eu
|
||||||
|
|
||||||
# checks if the branch and repository exists
|
# checks if the branch and repository exists
|
||||||
check_branch() {
|
check_branch() {
|
||||||
repo=${1:-}
|
repo=${1:-}
|
||||||
branch=${2:-}
|
branch=${2:-}
|
||||||
git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null
|
git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null
|
||||||
[ "$?" -eq "0" ]
|
[ "$?" -eq "0" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
@ -24,37 +24,37 @@ clone_develop() {
|
||||||
addons_git="develop"
|
addons_git="develop"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the branches exist before wiping the
|
# Check if the branches exist before wiping the
|
||||||
if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then
|
if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then
|
||||||
echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..."
|
echo "Cloning '${friendica_git}' from GitHub repository '${friendica_repo}' ..."
|
||||||
|
|
||||||
# Removing the whole directory first
|
# Removing the whole directory first
|
||||||
rm -fr /usr/src/friendica
|
rm -fr /usr/src/friendica
|
||||||
git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica
|
git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica
|
||||||
|
|
||||||
mkdir /usr/src/friendica/addon
|
mkdir /usr/src/friendica/addon
|
||||||
git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon
|
git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon
|
||||||
|
|
||||||
echo "Download finished"
|
echo "Download finished"
|
||||||
|
|
||||||
if [ ! -f /usr/src/friendica/VERSION ]; then
|
if [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
echo "Couldn't clone repository"
|
echo "Couldn't clone repository"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
|
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
else
|
else
|
||||||
if check_branch "$friendica_repo" "$friendica_git"; then
|
if check_branch "$friendica_repo" "$friendica_git"; then
|
||||||
echo "$friendica_repo/$friendica_git is not valid."
|
echo "$friendica_repo/$friendica_git is not valid."
|
||||||
else
|
else
|
||||||
echo "$friendica_addons_repo/$addons_git is not valid."
|
echo "$friendica_addons_repo/$addons_git is not valid."
|
||||||
fi
|
fi
|
||||||
echo "Using old version."
|
echo "Using old version."
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
|
|
|
@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
installed_version="$(cat /var/www/html/VERSION)"
|
installed_version="$(cat /var/www/html/VERSION)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
image_version="$(cat /usr/src/friendica/VERSION)"
|
image_version="$(cat /usr/src/friendica/VERSION)"
|
||||||
|
|
||||||
# no downgrading possible
|
# no downgrading possible
|
||||||
if version_greater "$installed_version" "$image_version"; then
|
if version_greater "$installed_version" "$image_version"; then
|
||||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup_ssmtp
|
setup_ssmtp
|
||||||
|
|
||||||
# check it just in case the version is greater
|
# check it just in case the version is greater
|
||||||
if version_greater "$image_version" "$installed_version"; then
|
if version_greater "$image_version" "$installed_version"; then
|
||||||
echo "Initializing Friendica $image_version ..."
|
echo "Initializing Friendica $image_version ..."
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0.0" ]; then
|
if [ "$installed_version" != "0.0.0.0" ]; then
|
||||||
|
|
|
@ -3,10 +3,10 @@ set -eu
|
||||||
|
|
||||||
# checks if the branch and repository exists
|
# checks if the branch and repository exists
|
||||||
check_branch() {
|
check_branch() {
|
||||||
repo=${1:-}
|
repo=${1:-}
|
||||||
branch=${2:-}
|
branch=${2:-}
|
||||||
git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null
|
git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null
|
||||||
[ "$?" -eq "0" ]
|
[ "$?" -eq "0" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
@ -24,37 +24,37 @@ clone_develop() {
|
||||||
addons_git="develop"
|
addons_git="develop"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the branches exist before wiping the
|
# Check if the branches exist before wiping the
|
||||||
if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then
|
if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then
|
||||||
echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..."
|
echo "Cloning '${friendica_git}' from GitHub repository '${friendica_repo}' ..."
|
||||||
|
|
||||||
# Removing the whole directory first
|
# Removing the whole directory first
|
||||||
rm -fr /usr/src/friendica
|
rm -fr /usr/src/friendica
|
||||||
git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica
|
git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica
|
||||||
|
|
||||||
mkdir /usr/src/friendica/addon
|
mkdir /usr/src/friendica/addon
|
||||||
git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon
|
git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon
|
||||||
|
|
||||||
echo "Download finished"
|
echo "Download finished"
|
||||||
|
|
||||||
if [ ! -f /usr/src/friendica/VERSION ]; then
|
if [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
echo "Couldn't clone repository"
|
echo "Couldn't clone repository"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
|
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
else
|
else
|
||||||
if check_branch "$friendica_repo" "$friendica_git"; then
|
if check_branch "$friendica_repo" "$friendica_git"; then
|
||||||
echo "$friendica_repo/$friendica_git is not valid."
|
echo "$friendica_repo/$friendica_git is not valid."
|
||||||
else
|
else
|
||||||
echo "$friendica_addons_repo/$addons_git is not valid."
|
echo "$friendica_addons_repo/$addons_git is not valid."
|
||||||
fi
|
fi
|
||||||
echo "Using old version."
|
echo "Using old version."
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
|
|
|
@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
installed_version="$(cat /var/www/html/VERSION)"
|
installed_version="$(cat /var/www/html/VERSION)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
image_version="$(cat /usr/src/friendica/VERSION)"
|
image_version="$(cat /usr/src/friendica/VERSION)"
|
||||||
|
|
||||||
# no downgrading possible
|
# no downgrading possible
|
||||||
if version_greater "$installed_version" "$image_version"; then
|
if version_greater "$installed_version" "$image_version"; then
|
||||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup_ssmtp
|
setup_ssmtp
|
||||||
|
|
||||||
# check it just in case the version is greater
|
# check it just in case the version is greater
|
||||||
if version_greater "$image_version" "$installed_version"; then
|
if version_greater "$image_version" "$installed_version"; then
|
||||||
echo "Initializing Friendica $image_version ..."
|
echo "Initializing Friendica $image_version ..."
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0.0" ]; then
|
if [ "$installed_version" != "0.0.0.0" ]; then
|
||||||
|
|
|
@ -3,10 +3,10 @@ set -eu
|
||||||
|
|
||||||
# checks if the branch and repository exists
|
# checks if the branch and repository exists
|
||||||
check_branch() {
|
check_branch() {
|
||||||
repo=${1:-}
|
repo=${1:-}
|
||||||
branch=${2:-}
|
branch=${2:-}
|
||||||
git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null
|
git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null
|
||||||
[ "$?" -eq "0" ]
|
[ "$?" -eq "0" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
@ -24,37 +24,37 @@ clone_develop() {
|
||||||
addons_git="develop"
|
addons_git="develop"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the branches exist before wiping the
|
# Check if the branches exist before wiping the
|
||||||
if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then
|
if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then
|
||||||
echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..."
|
echo "Cloning '${friendica_git}' from GitHub repository '${friendica_repo}' ..."
|
||||||
|
|
||||||
# Removing the whole directory first
|
# Removing the whole directory first
|
||||||
rm -fr /usr/src/friendica
|
rm -fr /usr/src/friendica
|
||||||
git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica
|
git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica
|
||||||
|
|
||||||
mkdir /usr/src/friendica/addon
|
mkdir /usr/src/friendica/addon
|
||||||
git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon
|
git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon
|
||||||
|
|
||||||
echo "Download finished"
|
echo "Download finished"
|
||||||
|
|
||||||
if [ ! -f /usr/src/friendica/VERSION ]; then
|
if [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
echo "Couldn't clone repository"
|
echo "Couldn't clone repository"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
|
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
else
|
else
|
||||||
if check_branch "$friendica_repo" "$friendica_git"; then
|
if check_branch "$friendica_repo" "$friendica_git"; then
|
||||||
echo "$friendica_repo/$friendica_git is not valid."
|
echo "$friendica_repo/$friendica_git is not valid."
|
||||||
else
|
else
|
||||||
echo "$friendica_addons_repo/$addons_git is not valid."
|
echo "$friendica_addons_repo/$addons_git is not valid."
|
||||||
fi
|
fi
|
||||||
echo "Using old version."
|
echo "Using old version."
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
|
|
|
@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
installed_version="$(cat /var/www/html/VERSION)"
|
installed_version="$(cat /var/www/html/VERSION)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
image_version="$(cat /usr/src/friendica/VERSION)"
|
image_version="$(cat /usr/src/friendica/VERSION)"
|
||||||
|
|
||||||
# no downgrading possible
|
# no downgrading possible
|
||||||
if version_greater "$installed_version" "$image_version"; then
|
if version_greater "$installed_version" "$image_version"; then
|
||||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup_ssmtp
|
setup_ssmtp
|
||||||
|
|
||||||
# check it just in case the version is greater
|
# check it just in case the version is greater
|
||||||
if version_greater "$image_version" "$installed_version"; then
|
if version_greater "$image_version" "$installed_version"; then
|
||||||
echo "Initializing Friendica $image_version ..."
|
echo "Initializing Friendica $image_version ..."
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0.0" ]; then
|
if [ "$installed_version" != "0.0.0.0" ]; then
|
||||||
|
|
|
@ -3,10 +3,10 @@ set -eu
|
||||||
|
|
||||||
# checks if the branch and repository exists
|
# checks if the branch and repository exists
|
||||||
check_branch() {
|
check_branch() {
|
||||||
repo=${1:-}
|
repo=${1:-}
|
||||||
branch=${2:-}
|
branch=${2:-}
|
||||||
git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null
|
git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null
|
||||||
[ "$?" -eq "0" ]
|
[ "$?" -eq "0" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# clones the whole develop branch (Friendica and Addons)
|
# clones the whole develop branch (Friendica and Addons)
|
||||||
|
@ -24,37 +24,37 @@ clone_develop() {
|
||||||
addons_git="develop"
|
addons_git="develop"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the branches exist before wiping the
|
# Check if the branches exist before wiping the
|
||||||
if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then
|
if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then
|
||||||
echo "Cloning '${friendica_git}' from GitHub repository '${friendica_repo}' ..."
|
echo "Cloning '${friendica_git}' from GitHub repository '${friendica_repo}' ..."
|
||||||
|
|
||||||
# Removing the whole directory first
|
# Removing the whole directory first
|
||||||
rm -fr /usr/src/friendica
|
rm -fr /usr/src/friendica
|
||||||
git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica
|
git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica
|
||||||
|
|
||||||
mkdir /usr/src/friendica/addon
|
mkdir /usr/src/friendica/addon
|
||||||
git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon
|
git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon
|
||||||
|
|
||||||
echo "Download finished"
|
echo "Download finished"
|
||||||
|
|
||||||
if [ ! -f /usr/src/friendica/VERSION ]; then
|
if [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
echo "Couldn't clone repository"
|
echo "Couldn't clone repository"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
|
/usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
else
|
else
|
||||||
if check_branch "$friendica_repo" "$friendica_git"; then
|
if check_branch "$friendica_repo" "$friendica_git"; then
|
||||||
echo "$friendica_repo/$friendica_git is not valid."
|
echo "$friendica_repo/$friendica_git is not valid."
|
||||||
else
|
else
|
||||||
echo "$friendica_addons_repo/$addons_git is not valid."
|
echo "$friendica_addons_repo/$addons_git is not valid."
|
||||||
fi
|
fi
|
||||||
echo "Using old version."
|
echo "Using old version."
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
|
|
|
@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
installed_version="$(cat /var/www/html/VERSION)"
|
installed_version="$(cat /var/www/html/VERSION)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
image_version="$(cat /usr/src/friendica/VERSION)"
|
image_version="$(cat /usr/src/friendica/VERSION)"
|
||||||
|
|
||||||
# no downgrading possible
|
# no downgrading possible
|
||||||
if version_greater "$installed_version" "$image_version"; then
|
if version_greater "$installed_version" "$image_version"; then
|
||||||
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup_ssmtp
|
setup_ssmtp
|
||||||
|
|
||||||
# check it just in case the version is greater
|
# check it just in case the version is greater
|
||||||
if version_greater "$image_version" "$installed_version"; then
|
if version_greater "$image_version" "$installed_version"; then
|
||||||
echo "Initializing Friendica $image_version ..."
|
echo "Initializing Friendica $image_version ..."
|
||||||
|
|
||||||
if [ "$installed_version" != "0.0.0.0" ]; then
|
if [ "$installed_version" != "0.0.0.0" ]; then
|
||||||
|
|
Loading…
Reference in a new issue