25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

make-installers: Apply cosmetic changes

This commit is contained in:
Holger Weiss 2022-05-16 00:13:43 +02:00
parent 8addf96f9e
commit 6d93d49c6c

View File

@ -68,10 +68,12 @@ code_path="/opt/$rel_name-$rel_vsn"
data_path="/opt/$rel_name" data_path="/opt/$rel_name"
conf_path="$data_path/conf" conf_path="$data_path/conf"
pem_file="$conf_path/server.pem" pem_file="$conf_path/server.pem"
url='https://docs.ejabberd.im/admin/upgrade/#specific-version-upgrade-notes' uninstall_file="$code_path/uninstall.txt"
url_doc_admin='https://docs.ejabberd.im/admin/installation/#administration-account' home_url='https://www.ejabberd.im'
doc_url='https://docs.ejabberd.im'
upgrade_url="$doc_url/admin/upgrade/#specific-version-upgrade-notes"
admin_url="$doc_url/admin/installation/#administration-account"
tmp_dir=$(mktemp -d "/tmp/.$rel_name.XXXXXX") tmp_dir=$(mktemp -d "/tmp/.$rel_name.XXXXXX")
path_uninstall="$code_path/uninstall.txt"
trap 'rm -rf "$tmp_dir"' INT TERM EXIT trap 'rm -rf "$tmp_dir"' INT TERM EXIT
umask 022 umask 022
@ -82,13 +84,13 @@ create_help_file()
cat >"$file" <<-EOF cat >"$file" <<-EOF
This is the $rel_name $rel_vsn-$iteration installer for linux-$arch This is the $rel_name $rel_vsn-$iteration installer for linux-$arch
Visit Visit:
https://www.ejabberd.im/ $home_url
ejabberd Documentation site: ejabberd documentation site:
https://docs.ejabberd.im/ $doc_url
EOF EOF
} }
@ -210,22 +212,23 @@ create_setup_script()
echo '$rel_name $rel_vsn has been installed successfully.' echo '$rel_name $rel_vsn has been installed successfully.'
echo echo
echo >$path_uninstall cat >'$uninstall_file' <<_EOF
echo '# To uninstall ejabberd, first remove the service:' >>$path_uninstall # To uninstall ejabberd, first remove the service. If you're using systemd:
echo 'systemctl --now disable ejabberd' >>$path_uninstall systemctl --now disable ejabberd
echo 'rm -rf /etc/systemd/system/ejabberd.service' >>$path_uninstall rm -f /etc/systemd/system/ejabberd.service
echo >>$path_uninstall
echo '# Remove the binary files' >>$path_uninstall # Remove the binary files:
echo 'rm -rf /opt/ejabberd-*' >>$path_uninstall rm -rf /opt/ejabberd-*
echo >>$path_uninstall
echo '# If you want to remove your config, database and logs:' >>$path_uninstall # If you want to remove your configuration, database and logs:
echo 'rm -rf /opt/ejabberd' >>$path_uninstall rm -rf /opt/ejabberd
_EOF
if [ \$is_upgrade = true ] if [ \$is_upgrade = true ]
then then
echo 'Please check the following web site for upgrade notes:' echo 'Please check the following web site for upgrade notes:'
echo echo
echo '$url' echo '$upgrade_url'
echo echo
echo 'If everything looks fine, restart the $rel_name service:' echo 'If everything looks fine, restart the $rel_name service:'
echo ' systemctl restart ejabberd' echo ' systemctl restart ejabberd'
@ -233,9 +236,10 @@ create_setup_script()
echo 'Now you can check ejabberd is running correctly:' echo 'Now you can check ejabberd is running correctly:'
echo ' systemctl status ejabberd' echo ' systemctl status ejabberd'
echo echo
echo 'Next you may want to edit ejabberd.yml to setup hosts,' echo 'Next you may want to edit ejabberd.yml to set up hosts,'
echo 'register an account and grant it admin rigts, see:' echo 'register an account and grant it admin rigts, see:'
echo '$url_doc_admin' echo
echo '$admin_url'
fi fi
EOF EOF
chmod +x "$dir/setup" chmod +x "$dir/setup"
@ -252,7 +256,8 @@ do
gzip -c -d <"$tgz_name" >"$tmp_dir/$tar_name" gzip -c -d <"$tgz_name" >"$tmp_dir/$tar_name"
create_help_file "$tmp_dir/help.txt" create_help_file "$tmp_dir/help.txt"
create_setup_script "$tmp_dir" "$tar_name" create_setup_script "$tmp_dir" "$tar_name"
"$makeself" --help-header "$tmp_dir/help.txt" "$tmp_dir" "$installer_name" "$rel_name $rel_vsn" './setup' "$makeself" --help-header "$tmp_dir/help.txt" \
"$tmp_dir" "$installer_name" "$rel_name $rel_vsn" './setup'
find "$tmp_dir" -mindepth 1 -delete find "$tmp_dir" -mindepth 1 -delete
done done
echo "$myself: Created installers successfully." echo "$myself: Created installers successfully."