File manager - Edit - /usr/local/CyberCP/cyberpanel/plogical/upgradeCritical.py
Back
#!/usr/local/CyberCP/bin/python import sys sys.path.append('/usr/local/CyberCP') import subprocess, shlex import os class UpgradeCritical: @staticmethod def executioner(command): try: FNULL = open(os.devnull, 'w') res = subprocess.call(shlex.split(command), stdout=FNULL) if res == 0: return 1 else: return 0 except BaseException as msg: return 0 @staticmethod def UpgradeImportantPackages(): if os.path.exists('/etc/lsb-release'): command = "DEBIAN_FRONTEND=noninteractive apt-get install --only-upgrade pdns-server pdns-backend-mysql install dovecot-imapd dovecot-pop3d postfix-mysql pure-ftpd postfix dovecot-mysql -y" UpgradeCritical.executioner(command) else: command = "yum update" UpgradeCritical.executioner(command) command = "yum -y upgrade pdns pdns-backend-mysql pure-ftpd postfix dovecot dovecot-mysql" UpgradeCritical.executioner(command) def main(): UpgradeCritical.UpgradeImportantPackages() if __name__ == "__main__": main()
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings