This commit is contained in:
simonzhangsz committed 2024-01-17 20:38:25 +08:00
1 parent 92a46667b1
commit 827ada36c9
2 files changed
+11 -4

No files matched your search

+7
View File
@@ -1,10 +1,14 @@
#!/bin/bash
filename="$1"
neType="$2"
extension=$(basename "${1}" | awk -F . '{print $NF}')
case "${extension}" in
deb)
if [ neType == "OMC" ]; then
systemctl stop restagent.service
fi
expect <<EOF
spawn dpkg -i --force-all "$filename"
set timeout 180
@@ -14,6 +18,9 @@ case "${extension}" in
EOF
;;
rpm)
if [ neType == "OMC" ]; then
systemctl stop restagent.service
fi
expect <<EOF
spawn rpm -Uvh --oldpackage "$filename"
set timeout 180