aboutsummaryrefslogtreecommitdiff
path: root/operators/command_stop.zsh
blob: 25405aa1de1f9d3c6dc90c168522883a37154ed1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Copyright (C) 2024-2026 Maria Lisina
# Copyright (C) 2024-2026 Danil Lisin
# SPDX-License-Identifier: Apache-2.0

if [[ "${chat_id}" != "${target_user}" ]]
then
    output_text="For security reasons you can execute this command only in direct messages"
    return
fi

until mkdir "${user_config}.lock"
do
    sleep 1
done

source "${units}/stop.zsh"

rmdir "${user_config}.lock"