Ignore:
Timestamp:
Sep 20, 2013 2:19:35 PM (10 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2
Children:
c3ae393
Parents:
5bd70b2
Message:

Add the new pc-thinclient WebUI

Its very basic, but it lets you upload / edit pc-sysinstall
config files, as well as add MAC address links to the config you want
to install it with. Includes some basic PHP auth as well, to restrict
who can use it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-thinclient/pc-thinclient

    rb5e5e3e r4023a66  
    253253} 
    254254 
     255# Check if the user wants to install packages for the webui 
     256check_webui() { 
     257        echo "PC-ThinClient includes a web-interface for client management." 
     258        echo "Would you like to install the Apache / PHP packages required?" 
     259        echo -e "(Y/y)\c"; 
     260        read ans 
     261        if [ $ans != "y" -o "$ans" != "Y" ] ; then return; fi  
     262 
     263        pkg install apache22 php5-hash php5-session 
     264        if [ $? -ne 0 ] ; then 
     265                echo "Package install failed!" 
     266                echo "You may need to manually add apache, php5-hash and php5-session." 
     267        fi 
     268 
     269        # Make sure the config file exists 
     270        if [ ! -e "${PROGDIR}/resources/webui/config.php" ] ; then 
     271                cp ${PROGDIR}/resources/webui/config.php.dist ${PROGDIR}/resources/webui/config.php 
     272        fi 
     273 
     274        echo "All the webui files are located in: ${PROGDIR}/resources/webui" 
     275        echo "You will need to configure your web-server to serve this directory." 
     276        echo "" 
     277        echo "Please edit the file ${PROGDIR}/resources/webui/config.php to set the" 
     278        echo "user passwords / auth tokens for the site." 
     279} 
    255280 
    256281# Check if we need to install custom config 
     
    412437        mkdir ${PXEWORLD}/installscripts 
    413438        cp ${PROGDIR}/resources/scripts/pc-sysinstall.example ${PXEWORLD}/installscripts/pc-sysinstall.example 
     439        chown -R www:www ${PXEWORLD}/installscripts 
     440 
    414441        echo "zfs_load=\"YES\"" > ${PXEWORLD}/boot/loader.conf 
    415442        echo "geom_mirror_load=\"YES\"" >> ${PXEWORLD}/boot/loader.conf 
     
    480507  # Setup the installation directories 
    481508  check_installdirs 
     509 
     510  # Ask if they want to use the WebUI 
     511  check_webui 
    482512fi 
    483513 
Note: See TracChangeset for help on using the changeset viewer.