development/hhvm: Create /var/run stuff in init script

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Robby Workman 2021-07-15 17:24:35 -05:00 committed by Willy Sudiarto Raharjo
parent e029881b4a
commit 4a41d4b400
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 8 additions and 10 deletions

View file

@ -28,7 +28,7 @@ do_stop () {
exit 1
fi
PID=`cat $2`
PID=$(cat $2)
kill $1 $PID
# Waiting for HHVM to shutdown
@ -37,7 +37,7 @@ do_stop () {
if ps -p $PID | grep -q $PID
then
echo -n .
try=`expr $try + 1`
try=$(expr $try + 1)
sleep 1
else
try=''
@ -66,7 +66,7 @@ wait_for_pid () {
fi
echo -n .
try=`expr $try + 1`
try=$(expr $try + 1)
sleep 1
done
@ -81,6 +81,9 @@ case "$1" in
exit 1
fi
mkdir -p $(dirname ${PIDFILE}) $(dirname ${hhvm_SOCKET})
chown apache:apache $(dirname ${PIDFILE})
echo
/usr/bin/hhvm --mode daemon $DAEMON_ARGS
if [ "$?" != 0 ]
@ -89,7 +92,6 @@ case "$1" in
exit 1
fi
mkdir -p `dirname $PIDFILE`
wait_for_pid $PIDFILE
if [ -n "$try" ] ; then
@ -125,7 +127,7 @@ case "$1" in
exit 0
fi
PID=`cat $PIDFILE`
PID=$(cat $PIDFILE)
if ps -p $PID | grep -q $PID
then
echo "HHVM (pid $PID) is running..."
@ -148,7 +150,7 @@ case "$1" in
exit 1
fi
kill -USR2 `cat $PIDFILE`
kill -USR2 $(cat $PIDFILE)
echo " done"
;;

View file

@ -138,10 +138,6 @@ install -m 644 -D $CWD/etc/php.ini $PKG/etc/hhvm/php.ini.new
mkdir -p $PKG/var/log/hhvm $PKG/usr/lib64/hhvm/extensions
# PID
mkdir -p $PKG/var/run/hhvm
chown apache:apache $PKG/var/run/hhvm
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.md LICENSE* hphp/doc/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild