4 # Required-Start: $local_fs
5 # Required-Stop: $local_fs
6 # X-Start-Before: nginx
7 # Default-Start: 2 3 4 5
9 # Short-Description: Initialise tmpfs file systems
12 PATH
=/sbin
:/usr
/sbin
:/bin
:/usr
/bin
15 .
/lib
/lsb
/init-functions
18 if [ -x /etc
/rc.
local ]
20 [ "$VERBOSE" != no
] && log_begin_msg
"Initialising tmpfs file systems"
22 ! mountpoint
-q /run ||
23 sudo
install -d -m 770 -o www-data
-g www-data \
27 if mountpoint
-q /run
/shm
&&
28 test -f /run
/shm
/.tmpfs
31 sudo
install -d -m 1777 -o root
-g root \
35 ! getent passwd www-data
>/dev
/null ||
36 sudo
install -d -m 770 -o www-data
-g www-data \
37 /run
/shm
/cache
/nginx \
38 /run
/shm
/cache
/nginx
/fastcgi \
39 /run
/shm
/cache
/nginx
/client_body
41 ! getent passwd php5
>/dev
/null ||
42 sudo
install -d -m 1771 -o php5
-g php5 \
46 /run
/shm
/cache
/php
5/fpm \
49 ! getent passwd gitweb
>/dev
/null ||
50 sudo
install -d -m 770 -o gitweb
-g gitweb \
55 [ "$VERBOSE" != no
] && log_end_msg
$ES
65 echo "Error: argument '$1' not supported" >&2
71 echo "Usage: $0 start|restart|stop" >&2