40 lines
966 B
Bash
Executable file
40 lines
966 B
Bash
Executable file
#!/bin/sh
|
|
|
|
os=$(cat "$__global/explorer/os")
|
|
if [ ! "$os" = "debian" ]
|
|
then
|
|
echo "OS $os is currently not supported." >&2
|
|
exit 1
|
|
fi
|
|
os_version=$(cat "$__global/explorer/os_version")
|
|
case "$os_version" in
|
|
8*)
|
|
php=php5
|
|
:
|
|
;;
|
|
9*)
|
|
php=php
|
|
:
|
|
;;
|
|
*)
|
|
echo "Unsupported version $os_version of $os." >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# Install packages
|
|
for package in ${php} php-gd php-json php-pgsql php-curl php-mbstring \
|
|
php-intl php-mcrypt php-imagick php-xml php-zip php-bz2 \
|
|
postgresql nginx
|
|
do __package $package --state=present
|
|
done
|
|
|
|
# Nginx
|
|
require="__package/nginx" __file /etc/nginx/sites-enabled/nextcloud --owner www-data \
|
|
--group www-data \
|
|
--mode 755 --source "$__type/files/nextcloud.nginx" \
|
|
--state exists
|
|
|
|
# Postgres
|
|
require="__package/postgresql" __postgres_database nextcloud --owner nextcloud
|
|
require="__package/postgresql" __start_on_boot postgres
|