Skip to content

Commit

Permalink
better order of cleaning methods
Browse files Browse the repository at this point in the history
  • Loading branch information
desertwitch committed Jul 26, 2023
1 parent 3cdf57a commit fb0908d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 4 additions & 5 deletions plugin/nut-2.8.0.plg
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,6 @@ if [[ ${version:0:3} == 6.0 ]]; then
exit 1
fi

# start install always with fresh folders
# in case of unclean old installation remnants
rm -rf /etc/nut
rm -rf /etc/ups

# Verify and install plugin package
sum1=$(/usr/bin/md5sum &plgPATH;/&plgNAME;.txz)
sum2=$(/usr/bin/cat &plgPATH;/&plgNAME;.md5)
Expand All @@ -264,6 +259,10 @@ else
/etc/rc.d/rc.nut stop 2>/dev/null
fi

# start install always with fresh folders
rm -rf /etc/nut
rm -rf /etc/ups

# nut-2.7.4 and nut plugin expects:
# Config: /etc/nut
# Pid : /var/run/nut/upsmon.pid
Expand Down
10 changes: 5 additions & 5 deletions plugin/nut.plg
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,6 @@ if [[ ${version:0:3} == 6.0 ]]; then
exit 1
fi

# start install always with fresh folders
# in case of unclean old installation remnants
rm -rf /etc/nut
rm -rf /etc/ups

# Verify and install plugin package
sum1=$(/usr/bin/md5sum &plgPATH;/&plgNAME;.txz)
sum2=$(/usr/bin/cat &plgPATH;/&plgNAME;.md5)
Expand All @@ -258,6 +253,11 @@ else
/etc/rc.d/rc.nut stop 2>/dev/null
fi

# start install always with fresh folders
rm -rf /etc/nut
rm -rf /etc/ups
mkdir /etc/nut

# upgrade plugin package
upgradepkg --install-new &plgPATH;/&plgNAME;.txz

Expand Down

0 comments on commit fb0908d

Please sign in to comment.