summaryrefslogtreecommitdiff
path: root/development/hhvm
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2021-07-15 17:24:35 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-07-17 09:50:23 +0700
commit4a41d4b400264a41ec8fb2a46c148fb06d1383e9 (patch)
tree9298cf0f91a567f2937b07fcefccbe8db2a5dc5b /development/hhvm
parente029881b4a905b7b47dba6c45667ff90d177bb78 (diff)
downloadslackbuilds-4a41d4b400264a41ec8fb2a46c148fb06d1383e9.tar.gz
development/hhvm: Create /var/run stuff in init script
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/hhvm')
-rw-r--r--development/hhvm/etc/rc.hhvm14
-rw-r--r--development/hhvm/hhvm.SlackBuild4
2 files changed, 8 insertions, 10 deletions
diff --git a/development/hhvm/etc/rc.hhvm b/development/hhvm/etc/rc.hhvm
index 33ab15a777..073e973a03 100644
--- a/development/hhvm/etc/rc.hhvm
+++ b/development/hhvm/etc/rc.hhvm
@@ -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"
;;
diff --git a/development/hhvm/hhvm.SlackBuild b/development/hhvm/hhvm.SlackBuild
index 9d49679226..62eb3c2e73 100644
--- a/development/hhvm/hhvm.SlackBuild
+++ b/development/hhvm/hhvm.SlackBuild
@@ -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