-
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathupstart.conf
More file actions
28 lines (23 loc) · 654 Bytes
/
upstart.conf
File metadata and controls
28 lines (23 loc) · 654 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
description "Greyhole - Easily expandable & redundant storage pool using Samba"
author "Guillaume Boudreau"
start on started mysql and started smbd
stop on shutdown
pre-start script
/usr/bin/greyhole --test-config 2> /tmp/gh-start-error
exit $?
end script
script
n=$(/usr/bin/greyhole --config daemon_niceness)
if [ "$n" = "false" ]; then
n=1
fi
nice -n $n /usr/bin/greyhole --daemon
end script
post-start script
PID=$(status greyhole | grep -Eoi '([0-9]+)$' | head -n1)
echo "$PID" > /var/run/greyhole.pid
end script
post-stop script
rm -f /var/run/greyhole.pid
/usr/bin/greyhole --process-spool >/dev/null
end script