Add vnstat build.
This commit is contained in:
parent
56abc31a5f
commit
7c12326a80
8 changed files with 555 additions and 0 deletions
22
source/vnstat/doinst.sh
Normal file
22
source/vnstat/doinst.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Version: 0.3.5
|
||||
# Copyright (c) 2005-2022:
|
||||
# Darren 'Tadgy' Austin <darren (at) afterdark.org.uk>
|
||||
# Licensed under the terms of the GNU General Public License version 3.
|
||||
|
||||
# Add service start to rc.local
|
||||
RC="rc.vnstatd"
|
||||
fgrep "/etc/rc.d/$RC" etc/rc.d/rc.local >/dev/null 2>&1 || {
|
||||
echo >>etc/rc.d/rc.local
|
||||
echo "[[ -x /etc/rc.d/$RC ]] /etc/rc.d/$RC start" >>etc/rc.d/rc.local
|
||||
}
|
||||
|
||||
# Add service shutdown to rc.local_shutdown
|
||||
fgrep "/etc/rc.d/$RC" etc/rc.d/rc.local_shutdown >/dev/null 2>&1 || {
|
||||
# If rc.local_shutdown doesn't exist, create it.
|
||||
[[ -e etc/rc.d/rc.local_shutdown ]] || {
|
||||
echo "#!/bin/bash" >etc/rc.d/rc.local_shutdown
|
||||
chmod 755 etc/rc.d/rc.local_shutdown
|
||||
}
|
||||
echo >>etc/rc.d/rc.local_shutdown
|
||||
echo "[[ -x /etc/rc.d/$RC ]] && /etc/rc.d/$RC stop" >>etc/rc.d/rc.local_shutdown
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue