Martineau
Part of the Furniture
I've submitted v1.03 pull request to accommodate the rename to@Martineau I created a file called "vnstat-install.sh" in the bitbucket scripts folder. I don't think that having a different name makes a difference, but wanted to differentiate it from the other files called vnstat. Can you verify your script will work even with the name "vnstat-install.sh"?
vnstat-install.shChange log
- Add Progress messages
- Do not remove Entware packagelibjpeg-turboduring the uninstall process.
I have removed the code and replaced it with
This install command
e.g. verification that the new name works....
		Code:
	
	./vnstat-install.sh install
./vnstat-install.sh: v1.03 Installing 'vnstat'....
./vnstat-install.sh:    Installing 'vnstat' Entware modules
Installing vnstat (1.18-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/vnstat_1.18-2_aarch64-3.10.ipk
Installing vnstati (1.18-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/vnstati_1.18-2_aarch64-3.10.ipk
Installing libjpeg-turbo (2.0.6-1) to root...
Downloading http://bin.entware.net/aarch64-k3.10/libjpeg-turbo_2.0.6-1_aarch64-3.10.ipk
Installing imagemagick (7.0.9-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/imagemagick_7.0.9-2_aarch64-3.10.ipk
Configuring vnstat.
Configuring libjpeg-turbo.
Configuring vnstati.
Configuring imagemagick.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   904  100   904    0     0   2597      0 --:--:-- --:--:-- --:--:--  2627
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   679  100   679    0     0   1656      0 --:--:-- --:--:-- --:--:--  1668
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4230  100  4230    0     0  12190      0 --:--:-- --:--:-- --:--:-- 12332
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1284  100  1284    0     0   3658      0 --:--:-- --:--:-- --:--:--  3689
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8233  100  8233    0     0  19235      0 --:--:-- --:--:-- --:--:-- 19417
./vnstat-install.sh:    Creating Addons GUI TAB
vnstat-ui: Mounting vnstat-ui WebUI page as user6.asp
./vnstat-install.sh:    Adding 'vnstat-ui' Addons GUI TAB creation service-event (@boot)
./vnstat-install.sh:    Adding cron jobs to services-start
./vnstat-install.sh:    Customising 'vnstat.conf' Auto detected (nvram get wan0_ifname) 'Interface eth0'
./vnstat-install.sh:    Customising 'vnstat.conf' 'BandwidthDetection 0'
./vnstat-install.sh:    Customising 'S32vnstat/vnstat-ww.sh' scripts Auto detected (nvram get wan0_ifname) 'Interface eth0'
Starting vnstatd...              done.vnstat to bind to a non-existant Interface provided by the user!
		Code:
	
	./vnstat-install.sh install vlan2
./vnstat-install.sh: v1.03 Installing 'vnstat'....
./vnstat-install.sh:    Installing 'vnstat' Entware modules
Package vnstat (1.18-2) installed in root is up to date.
Package vnstati (1.18-2) installed in root is up to date.
Package libjpeg-turbo (2.0.6-1) installed in root is up to date.
Package imagemagick (7.0.9-2) installed in root is up to date.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   904  100   904    0     0   2651      0 --:--:-- --:--:-- --:--:--  2666
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   679  100   679    0     0   1962      0 --:--:-- --:--:-- --:--:--  1985
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4230  100  4230    0     0  12051      0 --:--:-- --:--:-- --:--:-- 12190
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1284  100  1284    0     0   3700      0 --:--:-- --:--:-- --:--:--  3743
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8233  100  8233    0     0  23257      0 --:--:-- --:--:-- --:--:-- 23522
./vnstat-install.sh:    Creating Addons GUI TAB
vnstat-ui: Mounting vnstat-ui WebUI page as user6.asp
./vnstat-install.sh:    Adding 'vnstat-ui' Addons GUI TAB creation service-event (@boot)
./vnstat-install.sh:    Adding cron jobs to services-start
./vnstat-install.sh:    Customising 'vnstat.conf' Manual override 'Interface vlan2'
./vnstat-install.sh:    Customising 'vnstat.conf' 'BandwidthDetection 0'
./vnstat-install.sh:    Customising 'S32vnstat/vnstat-ww.sh' scripts Manual override 'Interface vlan2'
Error: Unable to read database "/opt/var/lib/vnstat/vlan2": No such file or directory
Error: Unable to get interface "vlan2" statistics.
Only available interfaces can be added for monitoring.
The following interfaces are currently available:
    spu_us_dummy sit0 imq1 tun22 (10 Mbit) lo eth3 br0 bcmsw tun21 (10 Mbit) ifb1 imq0 eth6 eth2 ip6tnl0 ifb0 eth5 eth1 dpsta imq2 spu_ds_dummy eth4 eth0 (1000 Mbit)
Shutting down vnstatd...              done.
Starting vnstatd...              done.
		Code:
	
	./vnstat-install.sh uninstall
./vnstat-install.sh: v1.03 Uninstalling 'vnstat'....
./vnstat-install.sh:    Stopping 'vnstat'
./vnstat-install.sh:    Uninstalling 'vnstat' Entware modules
Removing package vnstat from root...
Not deleting modified conffile /opt/etc/vnstat.conf.
Removing package vnstati from root...
Removing package imagemagick from root...
./vnstat-install.sh:    Deleting directories '/jffs/addons/vnstat*' and configuration 'vnstat.conf'
./vnstat-install.sh:    Uninstalling './vnstat-install.sh'
			
				Last edited: 
			
		
	
								
								
									
	
		
			
		
	
								
							
							 
	
 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		