add sbin to install and update
This commit is contained in:
parent
461ce697b3
commit
e300369ab0
|
@ -217,4 +217,6 @@ cp mini_sendmail.8.gz /usr/local/share/man/man8
|
|||
# install vhost scripts
|
||||
chmod 755 bin/*
|
||||
cp bin/* /usr/local/bin/
|
||||
chmod 755 sbin/*
|
||||
cp sbin/* /usr/local/sbin/
|
||||
|
||||
|
|
17
update.sh
17
update.sh
|
@ -25,6 +25,23 @@ for bin_script in "${bin_script_array[@]}"; do
|
|||
fi
|
||||
done
|
||||
|
||||
# update scripts in bin
|
||||
chmod 755 sbin/*
|
||||
readarray -t sbin_script_array < <(ls -1 sbin/)
|
||||
for sbin_script in "${sbin_script_array[@]}"; do
|
||||
if [ -f /usr/local/sbin/$sbin_script ]; then
|
||||
if ! diff -q sbin/$sbin_script /usr/local/sbin/$sbin_script ; then
|
||||
echo "Updating /usr/local/sbin/$sbin_script"
|
||||
cp sbin/$sbin_script /usr/local/sbin/$sbin_script
|
||||
echo
|
||||
fi
|
||||
else
|
||||
echo "Adding new script /usr/local/sbin/$sbin_script"
|
||||
cp sbin/$sbin_script /usr/local/sbin/$sbin_script
|
||||
echo
|
||||
fi
|
||||
done
|
||||
|
||||
# check etc configs for diffs
|
||||
readarray -t etc_configs_array < <(find etc/ -type f)
|
||||
for etc_config in "${etc_configs_array[@]}"; do
|
||||
|
|
Loading…
Reference in New Issue
Block a user