1

Topic: cleanup_db.py ??

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: Debian 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: Cron <root@hostname> /opt/www/iredadmin/tools/cleanup_db.py &>/dev/null
====

Hi,

Might be a pb:

/opt/www/iredadmin/tools/cleanup_db.py: 25: /opt/www/iredadmin/tools/cleanup_db.py: import: not found
/opt/www/iredadmin/tools/cleanup_db.py: 26: /opt/www/iredadmin/tools/cleanup_db.py: import: not found
/opt/www/iredadmin/tools/cleanup_db.py: 27: /opt/www/iredadmin/tools/cleanup_db.py: import: not found
/opt/www/iredadmin/tools/cleanup_db.py: 29: /opt/www/iredadmin/tools/cleanup_db.py: os.environ[LC_ALL]: not found
/opt/www/iredadmin/tools/cleanup_db.py: 31: /opt/www/iredadmin/tools/cleanup_db.py: Syntax error: "(" unexpected

If I run it manually:

/opt/www/iredadmin/tools# ./cleanup_db.py
./cleanup_db.py: ligne 25: import : commande introuvable
./cleanup_db.py: ligne 26: import : commande introuvable
./cleanup_db.py: ligne 27: import : commande introuvable
./cleanup_db.py: ligne 29: os.environ[LC_ALL] : commande introuvable
./cleanup_db.py: ligne 31: erreur de syntaxe près du symbole inattendu « ( »
./cleanup_db.py: ligne 31: `rootdir = os.path.abspath(os.path.dirname(__file__)) + '/../''

Any ideas ?

Thx

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: cleanup_db.py ??

Seems we have to add on the root crontab "python" in front of the command line .... Even if I add previously the "shebang line"

Thx

3

Re: cleanup_db.py ??

It's a bug of iRedAdmin upgrade script (tools/upgrade_iredadmin.sh), it doesn't define variable PYTHON_BIN.

Will fix it soon.

4

Re: cleanup_db.py ??

ZhangHuangbin wrote:

It's a bug of iRedAdmin upgrade script (tools/upgrade_iredadmin.sh), it doesn't define variable PYTHON_BIN.

Will fix it soon.

Is it fixed?

5

Re: cleanup_db.py ??

mindaugas wrote:

Is it fixed?

YES.