Skip to content
Snippets Groups Projects
Verified Commit 8abce443 authored by David Beniamine's avatar David Beniamine
Browse files

Merge branch 'master' of...

parents 81bcc7c3 daccd346
Branches
No related tags found
No related merge requests found
...@@ -38,6 +38,12 @@ then ...@@ -38,6 +38,12 @@ then
) > /etc/apt/preferences.d/backports ) > /etc/apt/preferences.d/backports
fi fi
if [ "${WEB_SERVER}" == "apache2" ]
then
export WEB_SERVER_PACKAGES="apache2 libapache2-mod-php"
else
export WEB_SERVER_PACKAGES="nginx-extras php-fpm"
fi
apt-get update apt-get update
......
export MODS="Base MySQL Nextcloud Dolibarr TetrasBack" export MODS="Base MySQL Nextcloud Dolibarr TetrasBack"
# Valid levels are security and upgrade
export MAINTENANCE_LEVEL="security"
export DOMAIN="dev.tetras-libre.fr" export DOMAIN="dev.tetras-libre.fr"
export SERVER_ADMIN="admin@dev.tetras-libre.fr" export SERVER_ADMIN="admin@dev.tetras-libre.fr"
# can be set to nginx
export WEB_SERVER=apache2 export WEB_SERVER=apache2
export WEB_SERVER_PACKAGES="apache2 libapache2-mod-php"
# If you'd rather use nginx, uncomment the following lines
# export WEB_SERVER=nginx
# export WEB_SERVER_PACKAGES="nginx-extras php-fpm"
...@@ -16,15 +16,21 @@ ...@@ -16,15 +16,21 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
aptitude update && aptitude upgrade
DIR=`dirname $0` DIR=`dirname $0`
. $DIR/main.env . $DIR/main.env
. $DIR/installNextcloud.env . $DIR/installNextcloud.env
if [ -z "$MODS" ] if [ -z "$MODS" ] || [ -z "$MAINTENANCE_LEVEL" ]
then then
echo "Please update your main.env to list the installed modules" echo "Please update your main.env"
exit 1 exit 1
fi fi
aptitude update
if [ "$MAINTENANCE_LEVEL" == "upgrade" ]
then
aptitude upgrade
else
unattended-upgrade
fi
for mod in $MODS for mod in $MODS
do do
script="$DIR/upgrade$mod.sh" script="$DIR/upgrade$mod.sh"
...@@ -34,4 +40,5 @@ do ...@@ -34,4 +40,5 @@ do
fi fi
done done
systemctl restart systemd-logind systemctl restart systemd-logind
systemctl restart `checkrestart | awk '/^service/{print $2} /^systemctl/{print $3}'`
checkrestart checkrestart
...@@ -22,6 +22,12 @@ then ...@@ -22,6 +22,12 @@ then
echo "Dolibarr not installed, aborting" echo "Dolibarr not installed, aborting"
exit 1 exit 1
fi fi
if [ "$MAINTENANCE_LEVEL" == "security" ] && [ "$1" != "force" ]
then
echo "Dolibar upgrade is disabled for security mode, to for upgrade, run:"
echo -e "\t$0 force"
exit 1
fi
git pull git pull
current_version=`apt-cache policy dolibarr | grep Installed | awk '{print $2}'` current_version=`apt-cache policy dolibarr | grep Installed | awk '{print $2}'`
echo "Current version of Dolibarr: $current_version" echo "Current version of Dolibarr: $current_version"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment