packages: fixed issues found by internal CI

pull/119/head
Andrei Belov 2025-01-14 09:53:23 +04:00
parent df07725607
commit 7647e97f3d
No known key found for this signature in database
GPG Key ID: E82C1118AF94DF6E
4 changed files with 39 additions and 4 deletions

View File

@ -75,9 +75,19 @@ start() {
chown -f $user /etc/amplify-agent/agent.conf
chown -f $user /var/log/amplify-agent/agent.log
daemon --user=$user $binary start --config=$conffile --pid=$pidfile
fi;
fi
RETVAL="$?"
echo
return $RETVAL
if [ "$RETVAL" -ne 0 ]; then
return "$RETVAL"
fi
for i in 1 2 3 4 5; do
if [ -e "$pidfile" ]; then
return 0
fi
sleep 1
done
return 1
}
stop() {
@ -123,6 +133,13 @@ debug() {
case "$1" in
start)
if status -p $pidfile amplify-agent >/dev/null 2>&1; then
echo "amplify-agent is already running" >&2
exit 0
fi
if [ -e "$pidfile" ]; then
rm -f "$pidfile"
fi
start
RETVAL=$?
;;
@ -135,7 +152,7 @@ case "$1" in
RETVAL=$?
;;
status)
status -p $pidfile amplify-agent
status -p $pidfile amplify-agent
RETVAL=$?
;;
configtest)

View File

@ -66,7 +66,16 @@ do_start()
chown -f $USER /var/log/amplify-agent/agent.log
start-stop-daemon --start --chuid $USER --exec $DAEMON start -- $DAEMON_ARGS
RETVAL="$?"
return "$RETVAL"
if [ "$RETVAL" -ne 0 ]; then
return "$RETVAL"
fi
for i in 1 2 3 4 5; do
if [ -e "$PIDFILE" ]; then
return 0
fi
sleep 1
done
return 1
}
do_stop()
@ -94,6 +103,13 @@ do_debug() {
case "$1" in
start)
if status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" >/dev/null 2>&1; then
echo " * $NAME is already running" >&2
exit 0
fi
if [ -e "$PIDFILE" ]; then
rm -f "$PIDFILE"
fi
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
do_start
case "$?" in

View File

@ -22,6 +22,7 @@ Architecture: any
Depends: ${misc:Depends},
${python3:Depends},
python3-daemon,
python3-pyasyncore,
python3-setproctitle,
python3-greenlet,
python3-gevent,

View File

@ -19,6 +19,7 @@ COMPAT_LEVELS = {
'bullseye': 13,
'jammy': 13,
'bookworm': 13,
'noble': 13,
}