slitaz-forge rev 684

Update pangolin server utility
author Christophe Lincoln <pankso@slitaz.org>
date Sun Mar 19 17:29:08 2017 +0100 (2017-03-19)
parents 7b0187b47370
children d720d2c157eb
files pangolin/pangolin
line diff
     1.1 --- a/pangolin/pangolin	Sun Mar 19 01:35:01 2017 +0100
     1.2 +++ b/pangolin/pangolin	Sun Mar 19 17:29:08 2017 +0100
     1.3 @@ -2,8 +2,7 @@
     1.4  #
     1.5  # Pangolin admin utility
     1.6  #
     1.7 -# Copyright (C) 2012-2014 SliTaz GNU/Linux - BSD License
     1.8 -#
     1.9 +# Copyright (C) 2012-2017 SliTaz GNU/Linux - BSD License
    1.10  # Authors : Christophe Lincoln <pankso@slitaz.org>
    1.11  #
    1.12  
    1.13 @@ -17,12 +16,14 @@
    1.14  	cat << EOT
    1.15  
    1.16  Usage: $(basename $0) [command]
    1.17 +
    1.18  Commands:
    1.19    up-www       Update website www.slitaz.org
    1.20    up-forum     Update forum.slitaz.org theme
    1.21    up-doc       Update doc.slitaz.org theme and configs
    1.22    up-hg        Update Hg web interface hg.slitaz.org
    1.23    up-pizza     Update Pizza web interface pizza.slitaz.me
    1.24 +  up-play      Update Gamers web interface play.slitaz.me
    1.25    up-pangolin  Update pangolin.slitaz.org virtual host
    1.26    adduser      Add a new user to Hg
    1.27    stats        Display some server stats
    1.28 @@ -108,7 +109,17 @@
    1.29  		newline ;;
    1.30  	
    1.31  	up-pangolin)
    1.32 -		# Update pangolin.slitaz.org
    1.33 +		# Update pangolin.slitaz.org and tools
    1.34 +		newline
    1.35 +		boldify "Updating tool: pangolin"
    1.36 +		cd ${REPOS}/slitaz-forge/pangolin && hg up
    1.37 +		make install
    1.38 +		
    1.39 +		newline
    1.40 +		boldify "Updating tool: slitaz-release"
    1.41 +		cd ${REPOS}/slitaz-dev-tools/slitaz-release && hg up
    1.42 +		make install
    1.43 +		
    1.44  		newline
    1.45  		boldify "Updating: pangolin.slitaz.org..."
    1.46  		cd ${REPOS}/slitaz-forge && hg up
    1.47 @@ -118,21 +129,22 @@
    1.48  	adduser)
    1.49  		[ ! "$2" ] && echo "Missing user name arg" && exit 0
    1.50  		[ ! "$3" ] && echo "Missing password arg" && exit 0
    1.51 -		htpasswd -b ${HGUSERS} $2 $3 ;;
    1.52 +		htpasswd -b ${HGUSERS} "$2" "$3" ;;
    1.53  	
    1.54  	stats)
    1.55  		# Echo some stats.
    1.56  		newline
    1.57 -		boldify "Disk usage"
    1.58 -		separator
    1.59 -		df -h | grep ^/dev
    1.60  		boldify "Memory usage"
    1.61  		separator
    1.62  		free -m | grep ^Mem
    1.63 +		newline
    1.64  		boldify "Connected users"
    1.65  		separator
    1.66  		who 
    1.67 -		newline ;;
    1.68 +		newline
    1.69 +		boldify "HG users"
    1.70 +		cat ${HGUSERS} | wc -l ;;
    1.71 +	
    1.72  	*)
    1.73  		usage ;;
    1.74  esac