38 lines
948 B
Bash
Executable file
38 lines
948 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}-intl ${php}-mcrypt ${php}-imagick \
|
|
postgresql nginx curl
|
|
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"
|
|
|
|
# Postgres
|
|
require="__package/postgresql" __postgres_database nextcloud --owner nextcloud
|
|
require="__package/postgresql" __postgres_role nextcloud --login --createdb
|