CMLAB-Cleaner/constant.py

70 lines
2.2 KiB
Python

# won't delete these files
KEEP_FILES = [".bashrc", ".bash_logout", ".bash_profile", "public-html", ".ssh", ".profile", "examples.desktop", ".bash_history", ".config", ".zshrc", ".vimrc", ".gnupg", ".oh-my-zsh", ".vim", ".viminfo", ".vscode-server", ".gitconfig", ".local", ".zsh_history", ".zsh_profile"]
# won't scan this directory
WHITE_LIST = ["mysql", "unix_manager", "unixmanager215", "gangxing", "how083012", "yulunliu", "amie12349", "minliwu", "chenyuyang", "unixmanager5xx"]
# filter date
DATE = '2024-02-01'
# owner, you have to change the GOOGLE_CODE if change this variable
GOOGLE_OWNER = "snsd0805@cmlab.csie.ntu.edu.tw"
# notify_template
MAIL_MSG = '''
Hi, {}<br>
<br>
因 CML Server 掛載家目錄(~)的 NAS 空間即將不足,我們將於 4/28(日) 00:00 開始清除長時間沒有修改紀錄的資料夾<br>
<br>
本次清理,我們將移除 '''+ DATE +''' 以後沒有修改紀錄的資料夾、檔案<br>
以下是您家目錄中可能被移除的內容:<br>
<ul>
{}
</ul>
<br>
若有需要即時確認有哪些資料受到影響,<br>
請到任一 CML Server 執行 `/service/software/bin/CMLAB-Cleaner/check`,會將預計刪除的資料列表出來,若沒有輸出則代表不會刪除任何資料。
若有需要保留的資料請以 touch 指令更新。<br>
<br>
造成不便,敬請見諒!<br><br>
<br>
* 信件由網管自動化工具寄出,若為錯誤寄送請忽略此信件。<br>
<br>
Best,<br>
CMLab Unix Manager, Ting-Jun Wang<br>
CMLab, National Taiwan University<br>
Email: unix_manager@cmlab.csie.ntu.edu.tw<br>
<pre>
__ __ _
/ / / /__ (_)_ __
__ ___/ /_/ / _ \/ /\ \ /
/ |/ /\____/_//_/_//_\_\____ ____
/ /|_/ / _ `/ _ \/ _ `/ _ `/ -_) __/
/_/ /_/\_,_/_//_/\_,_/\_, /\__/_/
/___/
</pre>
'''
# leave msg for the user
MOVE_MSG = """
Hi,
we have move out your files:
{}
If you have any problem, please contact us!
Best,
CMLab Unix Manager, Ting-Jun Wang
CMLab, National Taiwan University
Email: unix_manager@cmlab.csie.ntu.edu.tw
__ __ _
/ / / /__ (_)_ __
__ ___/ /_/ / _ \/ /\ \ /
/ |/ /\____/_//_/_//_\_\____ ____
/ /|_/ / _ `/ _ \/ _ `/ _ `/ -_) __/
/_/ /_/\_,_/_//_/\_,_/\_, /\__/_/
/___/
"""