mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/vnstat: small tweaks
Use "sleep 1" because start / restart returns fast without the PID file being up in time.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<form>
|
||||
<field>
|
||||
<id>general.enabled</id>
|
||||
<label>Enable vnstat daemon</label>
|
||||
<label>Enable vnStat daemon</label>
|
||||
<type>checkbox</type>
|
||||
<help>This will activate the vnstat daemon.</help>
|
||||
<help>This will activate the vnStat daemon.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.interface</id>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<menu>
|
||||
<Services>
|
||||
<Vnstat cssClass="fa fa-bar-chart" url="/ui/vnstat/general/index" />
|
||||
<VnStat cssClass="fa fa-bar-chart" url="/ui/vnstat/general/index" />
|
||||
</Services>
|
||||
</menu>
|
||||
|
||||
@@ -6,5 +6,4 @@ chmod 755 /var/run/vnstat
|
||||
|
||||
mkdir -p /var/lib/vnstat
|
||||
chown -R vnstat:vnstat /var/lib/vnstat
|
||||
chmod 755 /var/lib/
|
||||
chmod -R 755 /var/lib/vnstat
|
||||
chmod 755 /var/lib/vnstat /var/lib
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[start]
|
||||
command:/usr/local/opnsense/scripts/OPNsense/Vnstat/setup.sh;/usr/local/etc/rc.d/vnstat start
|
||||
command:/usr/local/opnsense/scripts/OPNsense/Vnstat/setup.sh;/usr/local/etc/rc.d/vnstat start && sleep 1
|
||||
parameters:
|
||||
type:script
|
||||
message:starting Vnstat
|
||||
@@ -11,7 +11,7 @@ type:script
|
||||
message:stopping Vnstat
|
||||
|
||||
[restart]
|
||||
command:/usr/local/opnsense/scripts/OPNsense/Vnstat/setup.sh;/usr/local/etc/rc.d/vnstat restart
|
||||
command:/usr/local/opnsense/scripts/OPNsense/Vnstat/setup.sh;/usr/local/etc/rc.d/vnstat restart && sleep 1
|
||||
parameters:
|
||||
type:script
|
||||
message:restarting Vnstat
|
||||
|
||||
Reference in New Issue
Block a user