Remove support for Debian 8, set nextcloud to new version

This commit is contained in:
Nico Schottelius 2020-09-21 09:08:07 +02:00
parent d53c02da71
commit 61144bc2cd
3 changed files with 26 additions and 34 deletions

View file

@ -9,15 +9,10 @@ case "$os" in
;; ;;
debian) debian)
case "$os_version" in case "$os_version" in
[1-7]*)
restart="/etc/init.d/nginx restart"
echo "Unsupported version $os_version of $os." >&2
exit 1
;;
8*) 8*)
restart="systemctl restart nginx" restart="systemctl restart nginx"
;; ;;
9*) 9*|10*)
restart="systemctl restart nginx" restart="systemctl restart nginx"
;; ;;
*) *)

View file

@ -20,19 +20,25 @@
# #
os=$(cat "$__global/explorer/os") os=$(cat "$__global/explorer/os")
if [ ! "$os" = "debian" -a ! "$os" = "devuan" ] case "$os" in
then debian|devuan)
echo "OS $os is currently not supported." >&2 :
exit 1 ;;
fi *)
echo "OS $os is currently not supported." >&2
exit 1
;;
esac
os_version=$(cat "$__global/explorer/os_version") os_version=$(cat "$__global/explorer/os_version")
case "$os_version" in case "$os_version" in
8*|jessie)
distribution="jessie"
;;
9*|ascii|ascii/ceres) 9*|ascii|ascii/ceres)
distribution="stretch" php_version=7.0
;; ;;
10*)
php_version=7.3
;;
*) *)
echo "Unsupported version $os_version of $os." >&2 echo "Unsupported version $os_version of $os." >&2
exit 1 exit 1
@ -47,18 +53,10 @@ domain=$(cat "$__object/parameter/domain")
tmpdir="$__object/files" tmpdir="$__object/files"
mkdir "$tmpdir" mkdir "$tmpdir"
__apt_key_uri dotdeb --uri https://www.dotdeb.org/dotdeb.gpg for package in php-gd php-json php-pgsql php-curl \
require="__apt_key_uri/dotdeb" __apt_source dotdeb --uri http://packages.dotdeb.org \ php-intl php-imagick \
--distribution ${distribution} \ php-zip php-apcu php-mbstring php-xml php-fpm; do
--component all __package $package
require="__apt_source/dotdeb" __apt_update_index
# Install packages
for package in php7.0-common php7.0-gd php7.0-json php7.0-pgsql php7.0-curl \
php7.0-intl php7.0-mcrypt php7.0-imagick \
php7.0-zip php7.0-apcu php7.0-mbstring php7.0-xml php7.0-fpm;
do require="__apt_update_index" __package $package --state=present
done done
__package postgresql --state=present __package postgresql --state=present
@ -66,9 +64,8 @@ __package curl --state=present
# Configure packages # Configure packages
## PHP 7 ## PHP 7
require="__package/php7.0-fpm" __file /etc/php/7.0/fpm/pool.d/www.conf \ require="__package/php-fpm" __file /etc/php/${php_version}/fpm/pool.d/www.conf \
--owner root --group root --mode 644 --source "$__type/files/fpm.conf" --owner root --group root --mode 644 --source "$__type/files/fpm.conf"
## Nginx ## Nginx
@ -77,7 +74,7 @@ __ungleich_http_server_ssl_redirect_letsencrypt --webroot /var/www/html/ "$domai
### Get the certificates ### Get the certificates
require="__ungleich_http_server_ssl_redirect_letsencrypt/$domain" \ require="__ungleich_http_server_ssl_redirect_letsencrypt/$domain" \
__letsencrypt_cert --admin-email technik@ungleich.ch \ __letsencrypt_cert --admin-email sre@ungleich.ch \
--webroot /var/www/html/ \ --webroot /var/www/html/ \
--renew-hook "service nginx reload" \ --renew-hook "service nginx reload" \
--domain "$domain" --automatic-renewal \ --domain "$domain" --automatic-renewal \
@ -103,4 +100,4 @@ require="__package/postgresql __postgres_role/${db_user}" __postgres_database "$
# Start on boot # Start on boot
require="__package/postgresql" __start_on_boot postgresql require="__package/postgresql" __start_on_boot postgresql
require="__package/nginx" __start_on_boot nginx require="__package/nginx" __start_on_boot nginx
require="__package/php7.0-fpm" __start_on_boot php7.0-fpm require="__package/php-fpm" __start_on_boot php${php_version}-fpm

View file

@ -1 +1 @@
13.0.6 19.0.3