DocScoDoc/tools/postupgrade.py

32 lines
661 B
Python
Raw Normal View History

#!/opt/zope213/bin/python
# -*- coding: utf-8 -*-
"""
ScoDoc post-upgrade script.
This script is launched by upgrade.sh after each SVN update.
Run as "root" with Zope shutted down and postgresql up,
_before_ upgrading the database.
E. Viennet, June 2008
Mar 2017: suppress upgrade of very old Apache configs
Aug 2020: move photos to .../var/scodoc/
Apr 2021: bug #70
Jun 2021: update for ScoDoc8
"""
import os
import sys
import glob
import shutil
from scodocutils import log, SCODOC_DIR, SCODOC_VAR_DIR, SCODOC_LOGOS_DIR, SCO_TMPDIR
if os.getuid() != 0:
log("postupgrade.py: must be run as root")
sys.exit(1)
# Continue here...
# ---
sys.exit(0)