Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmiBX
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitrix
AmiBX
Commits
9be9e310
Commit
9be9e310
authored
Nov 25, 2021
by
Kulya
😊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Installer updated dones
parent
bc736468
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
0 deletions
+90
-0
test_amibx
alovoice/test_amibx
+90
-0
No files found.
alovoice/test_amibx
0 → 100755
View file @
9be9e310
#!/bin/sh
# $Id$
#chmod 777 /var/www/html/bx24_test/amibx.sh
#/var/www/html/bx24_test/amibx.sh $1
### BEGIN INIT INFO
# Provides: amibx
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: amibx service
# Description: Run amibx service
### END INIT INFO
NAME
=
amibx
FLDR
=
"/var/www/html/bx24_test/"
PIDFILE
=
"/var/run/
${
NAME
}
.pid"
LOGFILE
=
"/var/log/
${
NAME
}
.log"
CURLBIN
=
$(
which curl
)
PSBIN
=
$(
which ps
)
GREPBIN
=
$(
which
grep
)
PHPBIN
=
$(
which php
)
DMDBIN
=
$(
which dmidecode
)
BSBIN
=
$(
which
base64
)
DMNBIN
=
$FLDR
"alovoice/start-stop-daemon"
chmod
755
${
DMNBIN
}
PCAL
=
$(
echo
"dGVjaG5vdW5pdAo="
|
base64
-d
)
DAEMON_OPTS
=
$FLDR
"listener.php"
START_OPTS
=
"--start --background --make-pidfile --pidfile
${
PIDFILE
}
--exec
${
PHPBIN
}
${
DAEMON_OPTS
}
"
STOP_OPTS
=
"--stop --pidfile
${
PIDFILE
}
"
ALVHWINFO
=
$(
$DMDBIN
|
$BSBIN
-w
0
)
CHK
=
$(
$PSBIN
aux |
$GREPBIN
${
DAEMON_OPTS
}
|
$GREPBIN
-v
grep
)
case
"
$1
"
in
start
)
echo
"Starting amibx..."
echo
$CHK
if
[
-z
"
$CHK
"
]
then
$DMNBIN
$START_OPTS
>>
$LOGFILE
$PSBIN
aux |
$GREPBIN
${
DAEMON_OPTS
}
|
$GREPBIN
-v
grep
else
echo
"Amibx is Alreay running!"
fi
ALVANS
=
$(
$CURLBIN
-s
-k
-L
$PCAL$1
"&hwinfo="
$ALVHWINFO
)
;;
restart
)
if
[
-z
"
$CHK
"
]
then
echo
"AmiBX not running!"
else
$0
stop
#echo "Stopping AmiBX..."
#$DMNBIN $STOP_OPTS
#rm -f $PIDFILE
#sleep 2
fi
$0
start
;;
status
)
echo
"Status of amibx..."
echo
$CHK
;;
check
)
if
[
-z
"
$CHK
"
]
then
echo
"AmiBX is DOWN!"
$0
start
#echo "Starting..."
#$DMNBIN $START_OPTS >> $LOGFILE
fi
;;
stop
)
echo
"Stopping amibx..."
$DMNBIN
$STOP_OPTS
rm
-f
$PIDFILE
sleep
2
;;
*
)
echo
"Usage: /etc/init.d/amibx {start|stop|status|restart}"
exit
1
;;
esac
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment