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

Do security upgrades via upgradeAll.sh

parent dd6c2f16
No related branches found
No related tags found
No related merge requests found
export MODS="Base MySQL Nextcloud Dolibarr TetrasBack"
# Valid levels are security and upgrade
export MAINTENANCE_LEVEL="security"
export DOMAIN="dev.tetras-libre.fr"
export SERVER_ADMIN="admin@dev.tetras-libre.fr"
# can be set to nginx
......
......@@ -16,15 +16,21 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
aptitude update && aptitude upgrade
DIR=`dirname $0`
. $DIR/main.env
. $DIR/installNextcloud.env
if [ -z "$MODS" ]
if [ -z "$MODS" ] || [ -z "$MAINTENANCE_LEVEL" ]
then
echo "Please update your main.env to list the installed modules"
echo "Please update your main.env"
exit 1
fi
aptitude update
if [ "$MAINTENANCE_LEVEL" == "upgrade" ]
then
aptitude upgrade
else
unattended-upgrade
fi
for mod in $MODS
do
script="$DIR/upgrade$mod.sh"
......
......@@ -22,6 +22,12 @@ then
echo "Dolibarr not installed, aborting"
exit 1
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
current_version=`apt-cache policy dolibarr | grep Installed | awk '{print $2}'`
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