sympl-core.init 2.72 KB
Newer Older
Steve Kemp's avatar
Steve Kemp committed
1
2
3
#!/bin/bash
#
### BEGIN INIT INFO
Paul Cammish's avatar
Paul Cammish committed
4
# Provides:          sympl-core
5
6
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
7
8
# Should-Start:      sshd
# Should-Stop:       sshd
Steve Kemp's avatar
Steve Kemp committed
9
10
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
Paul Cammish's avatar
Paul Cammish committed
11
12
# Short-Description: Alerts the user that the system is using Sympl.
# Description:       Alerts the user that the system is using Sympl a fancy logo.
Steve Kemp's avatar
Steve Kemp committed
13
14
### END INIT INFO
#
Paul Cammish's avatar
Paul Cammish committed
15
# Authors: Paul Cammish <sympl@kelduum.net>, Patrick J Cherry <patrick@bytemark.co.uk>
16
#
Steve Kemp's avatar
Steve Kemp committed
17

Paul Cammish's avatar
Paul Cammish committed
18
19
NAME="sympl-core"
DESC="Sympl"
20
21
PATH=/sbin:/usr/sbin:/bin:/usr/bin
SCRIPTNAME=/etc/init.d/$NAME
Steve Kemp's avatar
Steve Kemp committed
22

23
24
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
Steve Kemp's avatar
Steve Kemp committed
25

26
27
28
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
Steve Kemp's avatar
Steve Kemp committed
29

30
31
case "$1" in
    'start')
32
       log_action_msg "System configured with $DESC"
33
       echo "$(tput bold)"
34
       cat <<EOF
Paul Cammish's avatar
Paul Cammish committed
35
                                                                  ┌─────┐ v9.0
36
                                                                  └─┐   │
Paul Cammish's avatar
Paul Cammish committed
37
38
39
40
41
42
43
44
45
    ┌─────────┐ ┌───┐     ┌───┐ ┌─────────────┐   ┌───────────┐     │   │
  ┌─┘ ┌───────┘ │   │     │   │ │   ┌─┐   ┌─┐ └─┐ │   ┌─────┐ └─┐   │   │
  │   └─┐       │   │     │   │ │   │ │   │ │   │ │   │     │   │   │   │
  └─┐   └───┐   │   │     │   │ │   │ │   │ │   │ │   │     │   │   │   │
    └───┐   └─┐ │   │     │   │ │   │ │   │ │   │ │   │     │   │   │   │
        └─┐   │ │   │     │   │ │   │ │   │ │   │ │   │     │   │   │   │
  ┌───────┘ ┌─┘ └─┐ └─────┘   │ │   │ │   │ │   │ │   └─────┘ ┌─┘ ┌─┘   └─┐
  └─────────┘     └───────┐   │ └───┘ └───┘ └───┘ │   ┌───────┘   └───────┘
                  ┌───────┘ ┌─┘                   │   │
Paul Cammish's avatar
Paul Cammish committed
46
                  └─────────┘                     └───┘   https://sympl.io
47
EOF
48
echo "$(tput sgr0)"
Patrick J Cherry's avatar
Patrick J Cherry committed
49
       ;;
Steve Kemp's avatar
Steve Kemp committed
50

51
    'stop')
52
       log_action_msg "Thanks for using $DESC"
Patrick J Cherry's avatar
Patrick J Cherry committed
53
       ;;
Steve Kemp's avatar
Steve Kemp committed
54

55
    'restart'|'reload'|'force-reload'|'status')
56
       log_action_msg "System configured with $DESC"
57
       ;;
Steve Kemp's avatar
Steve Kemp committed
58

59
60
    *)
       echo "Usage: $SCRIPTNAME start|stop|restart|reload|force-reload|status"
Patrick J Cherry's avatar
Patrick J Cherry committed
61
62
       exit 1
       ;;
Steve Kemp's avatar
Steve Kemp committed
63
esac