mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-03-03 09:13:29 +08:00
Update
This commit is contained in:
parent
8ffc781f03
commit
5cc64c264b
3 changed files with 28 additions and 1 deletions
12
extra_scripts/ifupdown2-install.service
Normal file
12
extra_scripts/ifupdown2-install.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Install ifupdown2 on next reboot
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/root/install_ifupdown2.sh
|
||||
ExecStartPost=/sbin/reboot
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
15
extra_scripts/install_ifupdown2.sh
Normal file
15
extra_scripts/install_ifupdown2.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
# from
|
||||
# https://github.com/spiritLHLS/pve
|
||||
# 2023.06.25
|
||||
|
||||
# 安装ifupdown2
|
||||
apt-get update
|
||||
apt-get install -y ifupdown2
|
||||
|
||||
# 删除Systemd服务
|
||||
systemctl disable ifupdown2-install.service
|
||||
rm /etc/systemd/system/ifupdown2-install.service
|
||||
|
||||
# 删除自身
|
||||
rm $0
|
|
@ -3,7 +3,7 @@
|
|||
# https://github.com/spiritLHLS/pve
|
||||
# 2023.06.25
|
||||
|
||||
|
||||
cd /root >/dev/null 2>&1
|
||||
_red() { echo -e "\033[31m\033[01m$@\033[0m"; }
|
||||
_green() { echo -e "\033[32m\033[01m$@\033[0m"; }
|
||||
_yellow() { echo -e "\033[33m\033[01m$@\033[0m"; }
|
||||
|
|
Loading…
Reference in a new issue