ncc.zabbix_fbsd_templates

Yohn Y. 2025-10-04 Parent:e386b9d6312f

24:dab245c08aae Go to Latest

ncc.zabbix_fbsd_templates/tools/make_dist.sh

. Переименование утилит на машине разработки

History
1 #!/bin/bash
2 src_root="$(dirname "$(dirname "$(readlink -f "$0")")")"
3 dist_root="$(readlink -f "$src_root/../dist")"
5 ### VARS
6 dist_name="aw.fbsd-mon-helper.tgz"
7 dist_s3_link="s3fs/dist/config/zabbix/freebsd-template/${dist_name}"
9 echo "###"
10 tar -cvzf "${dist_root}/${dist_name}" \
11 --owner=root --group=root \
12 -C "$src_root/src" \
13 aw.fbsd-mon-helper
15 echo "==="
16 echo "${dist_root}/${dist_name}"
17 stat "${dist_root}/${dist_name}"
19 if [ "$(which mioctl)" ] && [ -f "${dist_root}/${dist_name}" ] ; then
20 echo "### PUSH DISTRIBUTION TO FS ###"
21 read -p "Upload file [y/N]: " _ans
22 case "$_ans" in
23 [Yy] | [yY][eE][sS] )
24 mioctl cp "${dist_root}/${dist_name}" "$dist_s3_link"
25 ;;
27 * )
28 echo "WARNING: Answer is '${_ans}', abort uploading"
29 ;;
31 esac
32 fi