File Makefile.in changed (mode: 100644) (index 1d0f43c..5065c2a) |
... |
... |
install: all |
41 |
41 |
cp -vd --no-clobber samples/config.php $(I_ETC)/$(PRJ)/ |
cp -vd --no-clobber samples/config.php $(I_ETC)/$(PRJ)/ |
42 |
42 |
cp -vd --no-clobber samples/php-fpm.conf $(I_ETC)/$(PRJ)/ |
cp -vd --no-clobber samples/php-fpm.conf $(I_ETC)/$(PRJ)/ |
43 |
43 |
cp -vd --no-clobber samples/pool.conf $(I_ETC)/$(PRJ)/ |
cp -vd --no-clobber samples/pool.conf $(I_ETC)/$(PRJ)/ |
|
44 |
|
@mkdir -pv $(I_ETC)/init.d/ |
|
45 |
|
cp -vd samples/rocketgit-fpm $(I_ETC)/init.d/ |
44 |
46 |
@mkdir -pv $(I_USR)/lib/systemd/system/ |
@mkdir -pv $(I_USR)/lib/systemd/system/ |
45 |
47 |
cp -vd samples/rocketgit-fpm.service $(I_USR)/lib/systemd/system/rocketgit-fpm.service |
cp -vd samples/rocketgit-fpm.service $(I_USR)/lib/systemd/system/rocketgit-fpm.service |
46 |
48 |
@ |
@ |
File samples/rocketgit-fpm added (mode: 100755) (index 0000000..b61b778) |
|
1 |
|
#!/bin/bash |
|
2 |
|
# rocketgit-fpm daemon |
|
3 |
|
# chkconfig: 345 20 80 |
|
4 |
|
# description: light and fast Git hosting solution. |
|
5 |
|
|
|
6 |
|
### BEGIN INIT INFO |
|
7 |
|
# Provides: rocketgit-fpm |
|
8 |
|
# Required-Start: $remote_fs $syslog |
|
9 |
|
# Required-Stop: $remote_fs $syslog |
|
10 |
|
# Default-Start: 2 3 4 5 |
|
11 |
|
# Default-Stop: 0 1 6 |
|
12 |
|
# Short-Description: Light and fast Git hosting solution. |
|
13 |
|
# Description: Light and fast Git hosting solution. |
|
14 |
|
### END INIT INFO |
|
15 |
|
|
|
16 |
|
DAEMON="php-fpm7.0" |
|
17 |
|
DAEMONOPTS="--fpm-config /etc/rocketgit/php-fpm.conf" |
|
18 |
|
|
|
19 |
|
NAME=rocketgit-fpm |
|
20 |
|
PIDFILE=/var/run/$NAME.pid |
|
21 |
|
SCRIPTNAME=/etc/init.d/$NAME |
|
22 |
|
|
|
23 |
|
case "$1" in |
|
24 |
|
start) |
|
25 |
|
printf "%-50s" "Starting $NAME..." |
|
26 |
|
mkdir -p /run/rocketgit-fpm/ |
|
27 |
|
PID=`$DAEMON $DAEMONOPTS > /dev/null 2>&1 & echo \$!` |
|
28 |
|
if [ -z "$PID" ]; then |
|
29 |
|
echo "Fail" |
|
30 |
|
else |
|
31 |
|
echo "$PID" > $PIDFILE |
|
32 |
|
echo "Ok" |
|
33 |
|
fi |
|
34 |
|
;; |
|
35 |
|
status) |
|
36 |
|
printf "%-50s" "Checking $NAME..." |
|
37 |
|
if [ -f $PIDFILE ]; then |
|
38 |
|
PID=`cat $PIDFILE` |
|
39 |
|
if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then |
|
40 |
|
echo "Process dead but pidfile exists" |
|
41 |
|
else |
|
42 |
|
echo "Running" |
|
43 |
|
fi |
|
44 |
|
else |
|
45 |
|
echo "Service not running" |
|
46 |
|
fi |
|
47 |
|
;; |
|
48 |
|
stop) |
|
49 |
|
printf "%-50s" "Stopping $NAME" |
|
50 |
|
PID=`cat $PIDFILE` |
|
51 |
|
if [ -f $PIDFILE ]; then |
|
52 |
|
kill $PID |
|
53 |
|
echo "Ok" |
|
54 |
|
rm -f $PIDFILE |
|
55 |
|
else |
|
56 |
|
echo "pidfile not found" |
|
57 |
|
fi |
|
58 |
|
;; |
|
59 |
|
|
|
60 |
|
restart) |
|
61 |
|
$0 stop |
|
62 |
|
$0 start |
|
63 |
|
;; |
|
64 |
|
|
|
65 |
|
*) |
|
66 |
|
echo "Usage: $0 {status|start|stop|restart}" |
|
67 |
|
exit 1 |
|
68 |
|
esac |