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
30 sudo
install -d -m 1777 -o root
-g root \
33 ! getent passwd www-data ||
34 sudo
install -d -m 660 -o www-data
-g www-data \
35 /run
/shm
/cache
/nginx \
36 /run
/shm
/cache
/nginx
/fastcgi \
37 /run
/shm
/cache
/nginx
/client_body
39 ! getent passwd php5 ||
40 sudo
install -d -m 1667 -o php5
-g php5 \
42 /run
/shm
/cache
/php
5/fpm
46 [ "$VERBOSE" != no
] && log_end_msg
$ES
56 echo "Error: argument '$1' not supported" >&2
62 echo "Usage: $0 start|restart|stop" >&2