feat: support restore from backup file

This commit is contained in:
ttionya
2020-11-08 13:43:47 +08:00
parent 0b6cb8f16e
commit 1710c92e73
3 changed files with 147 additions and 0 deletions
+10
View File
@@ -25,6 +25,16 @@ if [[ "$1" == "mail" ]]; then
exit 0
fi
# restore
if [[ "$1" == "restore" ]]; then
. /app/restore.sh
shift
restore $*
exit 0
fi
function configure_timezone() {
if [[ ! -f /etc/localtime || ! -f /etc/timezone ]]; then
cp -f /usr/share/zoneinfo/${TIMEZONE} /etc/localtime