-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrulisp
executable file
·50 lines (38 loc) · 1.28 KB
/
rulisp
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
### BEGIN INIT INFO
# Provides: rulispdaemon
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start rulisp server at boot time
### END INIT INFO
start () {
echo -n "Starting rulisp server... "
export LC_ALL="ru_RU.UTF-8"
sbcl --dynamic-space-size 400 --noinform --no-userinit --no-sysinit --load /etc/restas/restas-daemon.lisp /etc/restas/rulisp.daemon start
[ $? -eq 0 ] && echo "done." || echo "failed!"
}
nodaemon () {
sbcl --dynamic-space-size 400 --noinform --no-userinit --no-sysinit --load /etc/restas/restas-daemon.lisp /etc/restas/rulisp.daemon nodaemon
}
stop () {
echo -n "Stopping rulisp server... "
sbcl --noinform --no-userinit --no-sysinit --load /etc/restas/restas-daemon.lisp /etc/restas/rulisp.daemon kill
[ $? -eq 0 ] && echo "done." || echo "failed!"
}
restart () {
echo -n "Restart rulisp server... "
sbcl --noinform --no-userinit --no-sysinit --load /etc/restas/restas-daemon.lisp /etc/restas/rulisp.daemon restart
[ $? -eq 0 ] && echo "done." || echo "failed!"
}
help () {
echo "Usage: $0 <start|stop|restart|nodaemon>"
}
case "$1" in
start) start ;;
stop) stop ;;
nodaemon) nodaemon ;;
restart) restart ;;
*) help ;;
esac