File tree Expand file tree Collapse file tree 4 files changed +39
-4
lines changed
packages/nginx-amplify-agent/deb/debian Expand file tree Collapse file tree 4 files changed +39
-4
lines changed Original file line number Diff line number Diff line change @@ -75,9 +75,19 @@ start() {
75
75
chown -f $user /etc/amplify-agent/agent.conf
76
76
chown -f $user /var/log/amplify-agent/agent.log
77
77
daemon --user=$user $binary start --config=$conffile --pid=$pidfile
78
- fi ;
78
+ fi
79
+ RETVAL=" $? "
79
80
echo
80
- return $RETVAL
81
+ if [ " $RETVAL " -ne 0 ]; then
82
+ return " $RETVAL "
83
+ fi
84
+ for i in 1 2 3 4 5; do
85
+ if [ -e " $pidfile " ]; then
86
+ return 0
87
+ fi
88
+ sleep 1
89
+ done
90
+ return 1
81
91
}
82
92
83
93
stop () {
@@ -123,6 +133,13 @@ debug() {
123
133
124
134
case " $1 " in
125
135
start)
136
+ if status -p $pidfile amplify-agent > /dev/null 2>&1 ; then
137
+ echo " amplify-agent is already running" >&2
138
+ exit 0
139
+ fi
140
+ if [ -e " $pidfile " ]; then
141
+ rm -f " $pidfile "
142
+ fi
126
143
start
127
144
RETVAL=$?
128
145
;;
@@ -135,7 +152,7 @@ case "$1" in
135
152
RETVAL=$?
136
153
;;
137
154
status)
138
- status -p $pidfile amplify-agent
155
+ status -p $pidfile amplify-agent
139
156
RETVAL=$?
140
157
;;
141
158
configtest)
Original file line number Diff line number Diff line change @@ -66,7 +66,16 @@ do_start()
66
66
chown -f $USER /var/log/amplify-agent/agent.log
67
67
start-stop-daemon --start --chuid $USER --exec $DAEMON start -- $DAEMON_ARGS
68
68
RETVAL=" $? "
69
- return " $RETVAL "
69
+ if [ " $RETVAL " -ne 0 ]; then
70
+ return " $RETVAL "
71
+ fi
72
+ for i in 1 2 3 4 5; do
73
+ if [ -e " $PIDFILE " ]; then
74
+ return 0
75
+ fi
76
+ sleep 1
77
+ done
78
+ return 1
70
79
}
71
80
72
81
do_stop ()
@@ -94,6 +103,13 @@ do_debug() {
94
103
95
104
case " $1 " in
96
105
start)
106
+ if status_of_proc -p " $PIDFILE " " $DAEMON " " $NAME " > /dev/null 2>&1 ; then
107
+ echo " * $NAME is already running" >&2
108
+ exit 0
109
+ fi
110
+ if [ -e " $PIDFILE " ]; then
111
+ rm -f " $PIDFILE "
112
+ fi
97
113
[ " $VERBOSE " != no ] && log_daemon_msg " Starting $DESC " " $NAME "
98
114
do_start
99
115
case " $? " in
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ Architecture: any
22
22
Depends: ${misc:Depends},
23
23
${python3:Depends},
24
24
python3-daemon,
25
+ python3-pyasyncore,
25
26
python3-setproctitle,
26
27
python3-greenlet,
27
28
python3-gevent,
Original file line number Diff line number Diff line change 19
19
'bullseye' : 13 ,
20
20
'jammy' : 13 ,
21
21
'bookworm' : 13 ,
22
+ 'noble' : 13 ,
22
23
}
23
24
24
25
You can’t perform that action at this time.
0 commit comments