#!/bin/bash
#
-# Copyright (C) 2016 Georgia Public Library Service
+# Copyright (C) 2016-2020 Georgia Public Library Service
# Chris Sharp <csharp@georgialibraries.org>
#
# This program is free software: you can redistribute it and/or modify
RELEASE="$(lsb_release -r | awk '{print $2}')"
OSRF_WEB_ROOT="/openils/var/web"
if [ "$DISTRO" == "Ubuntu" ]; then
+ APT_TOOL="apt"
+ PREREQS="php7.0 php7.0-gd php7.0-pgsql php7.0-xml php7.0-dev php-memcache php-pear libapache2-mod-php7.0"
+ APACHE_RESTART="systemctl restart apache2.service"
+ # for 16.04, add the ondrej PPA to get the right PHP versions
if [ "$RELEASE" == "16.04" ]; then
- APT_TOOL="apt"
- PREREQS="php7.0 php7.0-gd php7.0-pgsql php7.0-xml php7.0-dev php-memcache php-pear libapache2-mod-php7.0"
- APACHE_RESTART="systemctl restart apache2.service"
add-apt-repository -y $PPA
- $APT_TOOL update
- else
- APT_TOOL="apt-get"
- PREREQS="php5 php5-gd php5-pgsql php5-memcache php-pear"
- APACHE_RESTART="service apache2 restart"
fi
else
echo "You do not appear to be running Ubuntu. Please install manually."
fi
# install prerequisites
+$APT_TOOL update
$APT_TOOL install -y $PREREQS
# restart apache to activate PHP