Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2019.09/apache/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ done
# TODO let the database and the autoinstall time to complete - not winning a beauty contest
sleep 15s

php /var/www/html/bin/daemon.php -f start
exec php /var/www/html/bin/daemon.php -f start
13 changes: 7 additions & 6 deletions 2019.09/apache/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ set -eu

# run an command with the www-data user
run_as() {
set -- -eu -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "cd /var/www/html;$1"
su - www-data -s /bin/sh "$@"
else
sh -c "$1"
sh "$@"
fi
}

Expand Down Expand Up @@ -44,10 +45,10 @@ clone_develop() {

# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "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
sh -c "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"

Expand Down Expand Up @@ -200,7 +201,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Starting Friendica installation ..."
# TODO Let the database time to warm up - not winning a beauty contest
sleep 10s
run_as "cd /var/www/html; php /var/www/html/bin/console.php autoinstall $install_options"
run_as "php /var/www/html/bin/console.php autoinstall $install_options"

# TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled
Expand All @@ -217,7 +218,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# upgrade
else
echo "Upgrading Friendica ..."
run_as 'cd /var/www/html; php /var/www/html/bin/console.php dbstructure update'
run_as 'php /var/www/html/bin/console.php dbstructure update'
echo "Upgrading finished"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion 2019.09/fpm-alpine/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ done
# TODO let the database and the autoinstall time to complete - not winning a beauty contest
sleep 15s

php /var/www/html/bin/daemon.php -f start
exec php /var/www/html/bin/daemon.php -f start
13 changes: 7 additions & 6 deletions 2019.09/fpm-alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ set -eu

# run an command with the www-data user
run_as() {
set -- -eu -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "cd /var/www/html;$1"
su - www-data -s /bin/sh "$@"
else
sh -c "$1"
sh "$@"
fi
}

Expand Down Expand Up @@ -44,10 +45,10 @@ clone_develop() {

# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "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
sh -c "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"

Expand Down Expand Up @@ -200,7 +201,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Starting Friendica installation ..."
# TODO Let the database time to warm up - not winning a beauty contest
sleep 10s
run_as "cd /var/www/html; php /var/www/html/bin/console.php autoinstall $install_options"
run_as "php /var/www/html/bin/console.php autoinstall $install_options"

# TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled
Expand All @@ -217,7 +218,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# upgrade
else
echo "Upgrading Friendica ..."
run_as 'cd /var/www/html; php /var/www/html/bin/console.php dbstructure update'
run_as 'php /var/www/html/bin/console.php dbstructure update'
echo "Upgrading finished"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion 2019.09/fpm/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ done
# TODO let the database and the autoinstall time to complete - not winning a beauty contest
sleep 15s

php /var/www/html/bin/daemon.php -f start
exec php /var/www/html/bin/daemon.php -f start
13 changes: 7 additions & 6 deletions 2019.09/fpm/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ set -eu

# run an command with the www-data user
run_as() {
set -- -eu -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "cd /var/www/html;$1"
su - www-data -s /bin/sh "$@"
else
sh -c "$1"
sh "$@"
fi
}

Expand Down Expand Up @@ -44,10 +45,10 @@ clone_develop() {

# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "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
sh -c "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"

Expand Down Expand Up @@ -200,7 +201,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Starting Friendica installation ..."
# TODO Let the database time to warm up - not winning a beauty contest
sleep 10s
run_as "cd /var/www/html; php /var/www/html/bin/console.php autoinstall $install_options"
run_as "php /var/www/html/bin/console.php autoinstall $install_options"

# TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled
Expand All @@ -217,7 +218,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# upgrade
else
echo "Upgrading Friendica ..."
run_as 'cd /var/www/html; php /var/www/html/bin/console.php dbstructure update'
run_as 'php /var/www/html/bin/console.php dbstructure update'
echo "Upgrading finished"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion 2019.12-dev/apache/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ done
# TODO let the database and the autoinstall time to complete - not winning a beauty contest
sleep 15s

php /var/www/html/bin/daemon.php -f start
exec php /var/www/html/bin/daemon.php -f start
13 changes: 7 additions & 6 deletions 2019.12-dev/apache/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ set -eu

# run an command with the www-data user
run_as() {
set -- -eu -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "cd /var/www/html;$1"
su - www-data -s /bin/sh "$@"
else
sh -c "$1"
sh "$@"
fi
}

Expand Down Expand Up @@ -44,10 +45,10 @@ clone_develop() {

# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "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
sh -c "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"

Expand Down Expand Up @@ -200,7 +201,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Starting Friendica installation ..."
# TODO Let the database time to warm up - not winning a beauty contest
sleep 10s
run_as "cd /var/www/html; php /var/www/html/bin/console.php autoinstall $install_options"
run_as "php /var/www/html/bin/console.php autoinstall $install_options"

# TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled
Expand All @@ -217,7 +218,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# upgrade
else
echo "Upgrading Friendica ..."
run_as 'cd /var/www/html; php /var/www/html/bin/console.php dbstructure update'
run_as 'php /var/www/html/bin/console.php dbstructure update'
echo "Upgrading finished"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion 2019.12-dev/fpm-alpine/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ done
# TODO let the database and the autoinstall time to complete - not winning a beauty contest
sleep 15s

php /var/www/html/bin/daemon.php -f start
exec php /var/www/html/bin/daemon.php -f start
13 changes: 7 additions & 6 deletions 2019.12-dev/fpm-alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ set -eu

# run an command with the www-data user
run_as() {
set -- -eu -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "cd /var/www/html;$1"
su - www-data -s /bin/sh "$@"
else
sh -c "$1"
sh "$@"
fi
}

Expand Down Expand Up @@ -44,10 +45,10 @@ clone_develop() {

# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "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
sh -c "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"

Expand Down Expand Up @@ -200,7 +201,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Starting Friendica installation ..."
# TODO Let the database time to warm up - not winning a beauty contest
sleep 10s
run_as "cd /var/www/html; php /var/www/html/bin/console.php autoinstall $install_options"
run_as "php /var/www/html/bin/console.php autoinstall $install_options"

# TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled
Expand All @@ -217,7 +218,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# upgrade
else
echo "Upgrading Friendica ..."
run_as 'cd /var/www/html; php /var/www/html/bin/console.php dbstructure update'
run_as 'php /var/www/html/bin/console.php dbstructure update'
echo "Upgrading finished"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion 2019.12-dev/fpm/cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ done
# TODO let the database and the autoinstall time to complete - not winning a beauty contest
sleep 15s

php /var/www/html/bin/daemon.php -f start
exec php /var/www/html/bin/daemon.php -f start
13 changes: 7 additions & 6 deletions 2019.12-dev/fpm/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ set -eu

# run an command with the www-data user
run_as() {
set -- -eu -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "cd /var/www/html;$1"
su - www-data -s /bin/sh "$@"
else
sh -c "$1"
sh "$@"
fi
}

Expand Down Expand Up @@ -44,10 +45,10 @@ clone_develop() {

# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "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
sh -c "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"

Expand Down Expand Up @@ -200,7 +201,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Starting Friendica installation ..."
# TODO Let the database time to warm up - not winning a beauty contest
sleep 10s
run_as "cd /var/www/html; php /var/www/html/bin/console.php autoinstall $install_options"
run_as "php /var/www/html/bin/console.php autoinstall $install_options"

# TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled
Expand All @@ -217,7 +218,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# upgrade
else
echo "Upgrading Friendica ..."
run_as 'cd /var/www/html; php /var/www/html/bin/console.php dbstructure update'
run_as 'php /var/www/html/bin/console.php dbstructure update'
echo "Upgrading finished"
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion docker-cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ done
# TODO let the database and the autoinstall time to complete - not winning a beauty contest
sleep 15s

php /var/www/html/bin/daemon.php -f start
exec php /var/www/html/bin/daemon.php -f start
13 changes: 7 additions & 6 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ set -eu

# run an command with the www-data user
run_as() {
set -- -eu -c "cd /var/www/html; $*"
if [ "$(id -u)" -eq 0 ]; then
su - www-data -s /bin/sh -c "cd /var/www/html;$1"
su - www-data -s /bin/sh "$@"
else
sh -c "$1"
sh "$@"
fi
}

Expand Down Expand Up @@ -44,10 +45,10 @@ clone_develop() {

# Removing the whole directory first
rm -fr /usr/src/friendica
sh -c "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
sh -c "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"

Expand Down Expand Up @@ -200,7 +201,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
echo "Starting Friendica installation ..."
# TODO Let the database time to warm up - not winning a beauty contest
sleep 10s
run_as "cd /var/www/html; php /var/www/html/bin/console.php autoinstall $install_options"
run_as "php /var/www/html/bin/console.php autoinstall $install_options"

# TODO Workaround because of a strange permission issue
rm -fr /var/www/html/view/smarty3/compiled
Expand All @@ -217,7 +218,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
# upgrade
else
echo "Upgrading Friendica ..."
run_as 'cd /var/www/html; php /var/www/html/bin/console.php dbstructure update'
run_as 'php /var/www/html/bin/console.php dbstructure update'
echo "Upgrading finished"
fi
fi
Expand Down