Debian 自动更新脚本。
需使用root权限进行安装。安装过程中将询问是否需要更新后提醒功能,若输入“N”则不会提醒;若输入“Y”,则需要输入电报机器人的token和chat id,更新后将通过电报机器人进行提醒。
文件位于/usr/local/AutoUpgrade/
中,其中AutoUpgrade.sh
为脚本,使用crontab
实现每天凌晨3点进行检查更新,upgrade.log
为日志,包含更新的时间和内容。
wget --no-check-certificate -O AutoUpgradeInstall.sh https://raw.githubusercontent.com/uselibrary/AutoUpgrade/main/install.sh && chmod +x AutoUpgradeInstall.sh && bash AutoUpgradeInstall.sh
Upgrade automatically for Debain
Run the code as root. There is opetion to notice you by telegram bot. If you input "N", you will not have noticed atfer the system was upgraded. Or, you need input token and chat id of your telegram bot who will notice you once the system upgraded.
The files locate at /usr/local/AutoUpgrade/
. AutoUpgrade.sh
is the script which relies on crontab
to upgrade daily (3 am). upgrade.log
is log, including upgrade time and content.
wget --no-check-certificate -O AutoUpgradeInstall.sh https://raw.githubusercontent.com/uselibrary/AutoUpgrade/main/install.sh && chmod +x AutoUpgradeInstall.sh && bash AutoUpgradeInstall.sh