File: bandwidthd.service

package info (click to toggle)
bandwidthd 2.0.1%2Bcvs20090917-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,316 kB
  • sloc: sh: 3,010; ansic: 2,752; php: 1,263; yacc: 216; makefile: 152; lex: 36; sql: 27
file content (19 lines) | stat: -rw-r--r-- 707 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[Unit]
Description=bandwidth monitoring and graphing daemon
Documentation=man:bandwidthd(8) man:bandwidthd.conf(5)

# abort if config file is missing.
ConditionPathExists=/etc/bandwidthd/bandwidthd.conf

[Service]
Environment="CONFFILE=/etc/bandwidthd/bandwidthd.conf"

# abort if unconfigured pgsql_connect_string detected.
ExecStartPre=/bin/bash -c '! grep -q "^pgsql_connect_string .user = someuser dbname = mydb host = localhost." $CONFFILE'
# abort if the config doesn't have a device set up.
ExecStartPre=/bin/bash -c 'grep -q "^dev " $CONFFILE'

Type=forking
WorkingDirectory=/var/lib/bandwidthd
ExecStart=/usr/sbin/bandwidthd $DAEMON_OPTS
#Note: the daemon can rotate logs if you send SIGHUP to it.