Skip to content

Commit

Permalink
more consistant check of installation hiddify panel
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Dec 15, 2024
1 parent bb688ae commit 212a208
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
29 changes: 16 additions & 13 deletions common/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -308,19 +308,21 @@ function check_hiddify_panel() {
[ $s == "hiddify-xray" ] && [ "$(hconfig 'core_type')" != "xray" ] && continue
s=${s##*/}
s=${s%%.*}
if [[ "$(systemctl is-active "$s")" != "active" ]]; then
warning "an important service $s is not working yet"
sleep 5
echo "checking again..."
if [[ "$(systemctl is-active "$s")" != "active" ]]; then
error "an important service $s is not working again"
error "Installation Failed!"
echo "32" >/opt/hiddify-manager/log/error.lock
exit 32
for i in $(seq 1 10); do
if [[ "$(systemctl is-active "$s")" == "active" ]]; then
break
else
if [ $i -eq 10 ]; then
error "important service $s is not activated after 10 seconds"
error "Installation Failed!"
echo "32" >/opt/hiddify-manager/log/error.lock
exit 32
fi
warning "an important service $s is not activating yet"
sleep 1
fi

fi

done

done
fi
}
Expand Down Expand Up @@ -387,8 +389,9 @@ function save_firewall() {

function show_progress_window() {
disable_ansii_modes
activate_python_venv
install_pypi_package cli_progress
python -m cli_progress --title "Hiddify Manager" $@
/opt/hiddify-manager/.venv/bin/python -m cli_progress --title "Hiddify Manager" $@
exit_code=$?
disable_ansii_modes
return $exit_code
Expand Down
2 changes: 1 addition & 1 deletion hiddify-panel/src
Submodule src updated from 6b0765 to 1b5948

0 comments on commit 212a208

Please sign in to comment.