fix alpine update script
This commit is contained in:
parent
4c0fd1c103
commit
32f8ce1c55
1 changed files with 4 additions and 4 deletions
|
@ -29,10 +29,6 @@ printf ""$font_colored_bold">> system update started..."$font_default"\n"
|
||||||
printf ""$font_colored"> updating packages..."$font_default"\n"
|
printf ""$font_colored"> updating packages..."$font_default"\n"
|
||||||
[[ "$noconfirm" ]] && apk --update-cache upgrade --progress || apk --update-cache upgrade --progress --interactive
|
[[ "$noconfirm" ]] && apk --update-cache upgrade --progress || apk --update-cache upgrade --progress --interactive
|
||||||
|
|
||||||
#printf ""$font_colored"> cleaning cache..."$font_default"\n"
|
|
||||||
#apk cache clean &> /dev/null
|
|
||||||
#rm -rf "/var/cache/apk/*"
|
|
||||||
|
|
||||||
orphans="$(apk list --orphaned | awk '{print $1}' 2> /dev/null)"
|
orphans="$(apk list --orphaned | awk '{print $1}' 2> /dev/null)"
|
||||||
if [[ "$orphans" ]]; then
|
if [[ "$orphans" ]]; then
|
||||||
orphans="$(printf "$orphans" | tr '\n' ' ')"
|
orphans="$(printf "$orphans" | tr '\n' ' ')"
|
||||||
|
@ -45,6 +41,10 @@ fi
|
||||||
script="$(dirname $(realpath $0))/conf.d/$(hostname).sh"
|
script="$(dirname $(realpath $0))/conf.d/$(hostname).sh"
|
||||||
[[ -x "$script" ]] && printf ""$font_colored"> executing script "$script"..."$font_default"\n" && (. "$script")
|
[[ -x "$script" ]] && printf ""$font_colored"> executing script "$script"..."$font_default"\n" && (. "$script")
|
||||||
|
|
||||||
|
printf ""$font_colored"> cleaning cache..."$font_default"\n"
|
||||||
|
apk cache clean &> /dev/null
|
||||||
|
rm -rf "/var/cache/apk/*"
|
||||||
|
|
||||||
printf ""$font_colored_bold">> system updated finished!"$font_default"\n"
|
printf ""$font_colored_bold">> system updated finished!"$font_default"\n"
|
||||||
|
|
||||||
[[ ! "$reboot" ]] && exit 0
|
[[ ! "$reboot" ]] && exit 0
|
||||||
|
|
Loading…
Reference in a new issue