2017-04-21 04:57:03 +00:00
|
|
|
#!/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*)
|
|
|
|
:
|
|
|
|
;;
|
2017-04-22 08:23:06 +00:00
|
|
|
9*)
|
|
|
|
:
|
|
|
|
;;
|
2017-04-21 04:57:03 +00:00
|
|
|
*)
|
|
|
|
echo "Unsupported version $os_version of $os." >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2017-04-23 06:16:43 +00:00
|
|
|
# Install packages
|
|
|
|
for package in php7.0 php7.0-gd php7.0-json php7.0-pgsql php7.0-curl php7.0-mbstring \
|
|
|
|
php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip php7.0-bz2 \
|
|
|
|
postgresql nginx
|
|
|
|
do __package $package --state=present
|
|
|
|
done
|
2017-04-21 04:57:03 +00:00
|
|
|
|
2017-04-23 06:16:43 +00:00
|
|
|
# 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
|
2017-04-21 04:57:03 +00:00
|
|
|
|
2017-04-23 06:16:43 +00:00
|
|
|
# Postgres
|
|
|
|
require="__package postgresql" __postgres_database nextcloud --owner nextcloud
|
|
|
|
require="__package/postgresql" __start_on_boot postgres
|