File: opensysusers.init

package info (click to toggle)
opensysusers 0.7.3-5.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 476 kB
  • sloc: xml: 578; sh: 239; makefile: 194
file content (43 lines) | stat: -rw-r--r-- 1,082 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/env /lib/init/init-d-script
#
### BEGIN INIT INFO
# Provides:          opensysusers
# Required-Start:    $local_fs
# Required-Stop:     
# Default-Start:     S
# Default-Stop:      0 6
# X-Start-Before:    opentmpfiles-setup
# Short-Description: Create System Users
### END INIT INFO
#
NAME='opensysusers'
DESC='standalone sysusers service'
DAEMON=/usr/bin/opensysusers-sysusers

do_start_cmd_override () {
    install -d /run/opensysusers
    $DAEMON
    if [ "$?" = 0 ]; then
        touch /run/opensysusers/ok
        log_success_msg "Opensysusers: system users successfully created"
    else
        log_failure_msg "Opensysusers: system users creation failed"
    fi
}

do_stop_cmd_override () {
    log_success_msg "Opensysusers: nothing to do at shutdown"
}

do_restart_override () {
    #No-Op
    log_success_msg "Opensysusers: nothing to do"
}

do_status_override () {
    if [ -e /run/opensysusers/ok ]; then
	log_success_msg "Opensysusers: system users creation complete"
    else
        log_failure_msg "Opensysusers: system users creation failed"
    fi
}