__ungleich_nextcloud/manifest

39 lines
923 B
Text
Raw Normal View History

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-23 12:40:53 +00:00
php=php5
2017-04-21 04:57:03 +00:00
:
;;
2017-04-22 08:23:06 +00:00
9*)
2017-04-23 12:40:53 +00:00
php=php
2017-04-22 08:23:06 +00:00
:
;;
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 ${php} ${php}-gd ${php}-json ${php}-pgsql ${php}-curl \
${php}-intl ${php}-mcrypt ${php}-imagick \
2017-04-23 06:16:43 +00:00
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
2017-04-23 06:22:31 +00:00
require="__package/nginx" __file /etc/nginx/sites-enabled/nextcloud --owner www-data \
--group www-data --mode 755 --source "$__type/files/nextcloud.nginx"
2017-04-21 04:57:03 +00:00
2017-04-23 06:16:43 +00:00
# Postgres
2017-04-23 06:22:31 +00:00
require="__package/postgresql" __postgres_database nextcloud --owner nextcloud
2017-04-23 06:16:43 +00:00
require="__package/postgresql" __start_on_boot postgres