diff --git a/do_postinstall.sh b/do_postinstall.sh index cefade87b00e171aa89d51c680f8c7c9c61ed021..92945b47a78f40c843b6c23ff5881a6df3a46183 100755 --- a/do_postinstall.sh +++ b/do_postinstall.sh @@ -33,13 +33,6 @@ DIR=`dirname $0` echo "Updating eole" Maj-Auto -echo "Generating containers" -gen_conteneurs - -echo "Instanciating server" -instance -diagnose -L - # Configure echo "Copying configuration" cp -v $DIR/eole/config.eol /etc/eole/ diff --git a/do_preinstall.sh b/do_preinstall.sh new file mode 100644 index 0000000000000000000000000000000000000000..c6d979ecbdb52d34d4967ee386379720b91f96ab --- /dev/null +++ b/do_preinstall.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Copyright (C) 2018 Tetras Libre <Contact@Tetras-Libre.fr> +# Author: Beniamine, David <David.Beniamine@Tetras-Libre.fr> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +if [ `whoami` != "root" ] +then + echo "This script should be run as root" + exit 1 +fi + +if [ -z "`which lxc-ls`" ] +then + echo "Please run postinstall on the master" + exit 1 +fi + +echo "Updating eole" +Maj-Auto + +echo "Generating containers" +gen_conteneurs + +echo "Instanciating server" +instance +diagnose -L diff --git a/preinstall.sh b/preinstall.sh new file mode 100755 index 0000000000000000000000000000000000000000..0098b559827264c7773ee31098bfb57654e6223e --- /dev/null +++ b/preinstall.sh @@ -0,0 +1,3 @@ +#!/bin/bash +git pull +`dirname $0`/do_preinstall.sh