Skip to content

Commit 7ace374

Browse files
committedJan 22, 2020
prettied up installer output
1 parent be81761 commit 7ace374

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
 

‎install.sh

+11-4
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,30 @@ _install() {
109109
};
110110
EOF
111111

112-
echo "Installing script to /usr/share/pve-nag-buster.sh"
112+
# install the hook script
113113
temp=''
114114
if [ "$1" = "--offline" ]; then
115-
# offline mode, emit stored script
115+
# packed script requested
116116
temp="$(mktemp)" && trap "rm -f $temp" EXIT
117117
emit_script > "$temp"
118118
elif [ -f "pve-nag-buster.sh" ]; then
119119
# local copy available
120120
temp="pve-nag-buster.sh"
121121
else
122122
# fetch from github
123-
temp="$(mktemp)" && trap "rm -f $temp" EXIT
123+
echo "Fetching hook script from GitHub ..."
124+
tempd="$(mktemp -d)" &&
125+
trap "echo 'Cleaning up temporary files ...'; rm -f $tempd/*; rmdir $tempd" EXIT
126+
temp="$tempd/pve-nag-buster.sh"
124127
wget https://raw.githubusercontent.com/foundObjects/pve-nag-buster/master/pve-nag-buster.sh \
125-
-O "$temp"
128+
-q --show-progress -O "$temp"
126129
fi
130+
echo "Installing hook script as /usr/share/pve-nag-buster.sh"
127131
install -o root -m 0550 "$temp" "/usr/share/pve-nag-buster.sh"
132+
133+
echo "Running patch script"
128134
/usr/share/pve-nag-buster.sh
135+
129136
return 0
130137
}
131138

0 commit comments

Comments
 (0)
Failed to load comments.