30 lines
347 B
Bash
30 lines
347 B
Bash
#!/bin/bash
|
|
|
|
#
|
|
# AIM : Manage Opennebula database update
|
|
#
|
|
#
|
|
|
|
. /usr/lib/eole/ihm.sh
|
|
|
|
function updateDB()
|
|
{
|
|
local dbfile='/var/lib/one/one.db'
|
|
local cmd="onedb"
|
|
|
|
if [[ -f ${dbfile} ]]
|
|
then
|
|
$cmd upgrade -f -s ${dbfile}
|
|
return ${?}
|
|
else
|
|
return 0
|
|
fi
|
|
}
|
|
|
|
echo
|
|
EchoGras "Mise à jour de la base de données ONE"
|
|
echo
|
|
updateDB
|
|
echo
|
|
exit ${?}
|