July 22, 201015 yr I've created some new webGui plugins http://code.google.com/p/unraid-webgui/downloads/list I have done this with slackbuild scripts. My key goal was to get a locate plugin working (I use this all the time). My second goal was to build an example of packaging up a webGui plugin to make it easier for others to grab and install. The way I've set it up so far, you can edit files in your source location, build the slackware package and install it in one step. It's a few minutes more, but when you are done you will have the source distro and the slackware package ready to go. Check out the downloads section. http://code.google.com/p/unraid-webgui/downloads/list files is my Files Tab locate is the interface tool into locate/updatedb. it goes under the files/filesSearchSection
July 22, 201015 yr Author I've built these packages using a slightly enhanced version of a SlackBuild script. It contains two additional command line modes. --makedist (makes a .tar.gz distribution of the source as described in the .SlackBuild) --install (installs the slackware package you just made). The thought here is to allow editing in one location. Generation of a slackware package and installation in one swoop. I'm hoping this will help standardize installations so there are not a bunch of .zip archives attached into forum. Here's the example cycle with a run through Clean up source and slackware package. root@unraidvm:/boot/home/rcotrone/src/webGui/files/files+webGui-1.00# rm -vi *gz rm: remove regular file `files+webGui-1.00-noarch-unRAID.tgz'? y removed `files+webGui-1.00-noarch-unRAID.tgz' rm: remove regular file `files+webGui-1.00.tar.gz'? y removed `files+webGui-1.00.tar.gz' root@unraidvm:/boot/home/rcotrone/src/webGui/files/files+webGui-1.00# ls -l total 256 -rwxrwxrwx 1 root root 3243 Jul 22 16:28 files+webGui.SlackBuild* -rwxrwxrwx 1 root root 191 Jul 22 16:11 files.page* -rwxrwxrwx 1 root root 182 Jul 22 16:12 filesSearchSection.page* -rwxrwxrwx 1 root root 707 Jul 22 15:57 slack-desc* Build a source distribution in raw format. root@unraidvm:/boot/home/rcotrone/src/webGui/files/files+webGui-1.00# ./files+webGui.SlackBuild --makedist Building SOURCE Distribution: files+webGui-1.00.tar.gz files+webGui-1.00/ files+webGui-1.00/files.page files+webGui-1.00/filesSearchSection.page files+webGui-1.00/slack-desc files+webGui-1.00/files+webGui.SlackBuild -rwxrwxrwx 1 root root 1928 Jul 22 17:22 files+webGui-1.00.tar.gz There is your original source We will now build from the tarred'gz'ed source distribution root@unraidvm:/boot/home/rcotrone/src/webGui/files/files+webGui-1.00# ./files+webGui.SlackBuild Using SOURCE Distribuition: /boot/home/rcotrone/src/webGui/files/files+webGui-1.00/files+webGui-1.00.tar.gz Creating tar file files+webGui-1.00-noarch-unRAID.tar... ./ tar-1.13: files+webGui-1.00-noarch-unRAID.tar is the archive; not dumped install/ install/slack-desc usr/ usr/doc/ usr/doc/files+webGui-1.00/ usr/doc/files+webGui-1.00/files+webGui.SlackBuild usr/doc/files+webGui-1.00/slack-desc usr/local/ usr/local/webGui/ usr/local/webGui/filesSearchSection.page usr/local/webGui/files.page Gzipping files+webGui-1.00-noarch-unRAID.tar... Renaming files+webGui-1.00-noarch-unRAID.tar.gz to files+webGui-1.00-noarch-unRAID.tgz... A slackware package is now ready to be installed Install from the slackware package. root@unraidvm:/boot/home/rcotrone/src/webGui/files/files+webGui-1.00# installpkg files+webGui-1.00-noarch-unRAID.tgz Installing package files+webGui-1.00-noarch-unRAID... PACKAGE DESCRIPTION: files+webGui: files+webGui: files+webGui is an unRAID 5.x addon to access Add a files section to gui files+webGui: Version 1.00 files+webGui: files+webGui: OK No biggie here. We made a source distribution. Make a slackware package from the source distribution and installed it. This what I call the Rapid build and install I've removed all the .tar.gz and .tgz files. We are in our source directory. We run the slackbuild script. Since there is no source distribution, it will use the files as is from the current directory to build the slackware package then install it. It would be equivilent to a make make install root@unraidvm:/boot/home/rcotrone/src/webGui/files/files+webGui-1.00# ./files+webGui.SlackBuild --install wget -c http://unraid-weebotech.googlecode.com/files/files+webGui-1.00.tgz missing SOURCE Distribution: /boot/home/rcotrone/src/webGui/files/files+webGui-1.00/files+webGui-1.00.tar.gz Assuming files are in /boot/home/rcotrone/src/webGui/files/files+webGui-1.00 Start SlackBuild files+webGui-1.00 Slackware package maker, version 2.1. Searching for symbolic links: No symbolic links were found, so we won't make an installation script. You can make your own later in ./install/doinst.sh and rebuild the package if you like. This next step is optional - you can set the directories in your package to some sane permissions. If any of the directories in your package have special permissions, then DO NOT reset them here! Would you like to reset all directory permissions to 755 (drwxr-xr-x) and directory ownerships to root.root ([y]es, [n]o)? n Creating tar file files+webGui-1.00-noarch-unRAID.tar... ./ tar-1.13: files+webGui-1.00-noarch-unRAID.tar is the archive; not dumped install/ install/slack-desc usr/ usr/doc/ usr/doc/files+webGui-1.00/ usr/doc/files+webGui-1.00/files+webGui.SlackBuild usr/doc/files+webGui-1.00/slack-desc usr/local/ usr/local/webGui/ usr/local/webGui/filesSearchSection.page usr/local/webGui/files.page Gzipping files+webGui-1.00-noarch-unRAID.tar... Renaming files+webGui-1.00-noarch-unRAID.tar.gz to files+webGui-1.00-noarch-unRAID.tgz... Moving files+webGui-1.00-noarch-unRAID.tgz to /boot/home/rcotrone/src/webGui/files/files+webGui-1.00... Package creation complete. -rwxrwxrwx 1 root root 2080 Jul 22 17:23 /boot/home/rcotrone/src/webGui/files/files+webGui-1.00/files+webGui-1.00-noarch-unRAID.tgz Installing package files+webGui-1.00-noarch-unRAID... PACKAGE DESCRIPTION: files+webGui: files+webGui: files+webGui is an unRAID 5.x addon to access Add a files section to gui files+webGui: Version 1.00 files+webGui: files+webGui: The package is now installed and ready to test
July 22, 201015 yr Author Presented here so you can get an idea of what is going on without downloading the other packages. Note: Subject to change. #!/bin/sh # based on the Slackware 12.0 SlackBuild # Packager Rob Cotrone ( WeeboTech at mydomain dot com) # http://lime-technology.com # Required: CWD=`pwd` TMP=${TMP:-/tmp/tgz} NAME=files+webGui PKG=$TMP/package-${NAME} VERSION=1.00 ARCH=${ARCH:-noarch} BUILD=unRAID SOURCE=http://unraid-weebotech.googlecode.com/files/${NAME}-${VERSION}.tgz if [ "$1" = "--makedist" ] then echo "Building SOURCE Distribution: ${NAME}-${VERSION}.tar.gz" echo rm -vf "$NAME-$VERSION-$ARCH-$BUILD.tgz" "${NAME}-${VERSION}.tar.gz" tar -C .. -cvzf ${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION} echo ls -l ${NAME}-${VERSION}.tar.gz echo exit fi if [ ! -e $NAME-$VERSION.tar.gz ] then echo wget -c $SOURCE fi if [ ! -d $TMP ] then mkdir -p $TMP fi if [ ! -d $PKG ] then mkdir -p $PKG else rm -rf ${PKG} mkdir ${PKG} fi cd $TMP if [ -f $CWD/$NAME-$VERSION.tar.gz ] then echo "Using SOURCE Distribuition: $CWD/$NAME-$VERSION.tar.gz" tar xvzf $CWD/$NAME-$VERSION.tar.gz else echo "missing SOURCE Distribution: $CWD/$NAME-$VERSION.tar.gz" echo "Assuming files are in ${CWD}" sleep 3 fi echo -e "\n\E[0;32mStart SlackBuild $NAME-$VERSION\E[0;0m\n" if [ ! -d $NAME-$VERSION ] then mkdir -p $NAME-$VERSION fi cd $NAME-$VERSION find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; # chown -R root:root . # Here is where the manual build install commands go. WEBGUIDIR="usr/local/webGui" install -d ${PKG}/${WEBGUIDIR} while read FILE do [ -z "${FILE%\#*}" ] && continue F=${FILE##*/} # basename of file D=${FILE%%$F} # dirname of file B=${F%.*} # strip off after last . character E=${F#${B}\.} # get extension after last . # echo "D=${D}, F=${F}, B=${B}, E=${E}" install -p -m550 ${FILE} ${PKG}/${WEBGUIDIR} if [ "${E}" = "page" ] then sed -i "s/Version=.*/Version=\"${VERSION}\"/g" ${PKG}/${WEBGUIDIR}/${F} fi done <<-EOF # List your files here. You can comment them out if needed. ${CWD}/files.page ${CWD}/filesSearchSection.page EOF # The rest should be standard on all installations mkdir -p ${PKG}/install mkdir -p ${PKG}/usr/doc/${NAME}-${VERSION} sed "s/#.##/${VERSION}/g" < ${CWD}/slack-desc > ${PKG}/install/slack-desc sed "s/#.##/${VERSION}/g" < ${CWD}/slack-desc > ${PKG}/usr/doc/${NAME}-${VERSION}/slack-desc cat ${CWD}/${NAME}.SlackBuild > ${PKG}/usr/doc/${NAME}-${VERSION}/${NAME}.SlackBuild if [ -f ${CWD}/doinst.sh ] then cat $CWD/doinst.sh > $PKG/install/doinst.sh fi if [ -d ${PKG}/usr/man ] then find "${PKG}/usr/man" -type f -exec gzip {} \; fi cd ${PKG} # requiredbuilder -y -v -s ${CWD} ${PKG} makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ] then rm -rf $TMP shift fi if [ -f ${CWD}/${NAME}-${VERSION}.tar.gz ] then ls -l ${CWD}/${NAME}-${VERSION}.tar.gz fi if [ -f ${CWD}/$NAME-$VERSION-$ARCH-$BUILD.tgz ] then ls -l ${CWD}/$NAME-$VERSION-$ARCH-$BUILD.tgz fi if [ "$1" = "--install" ] then echo;installpkg ${CWD}/$NAME-$VERSION-$ARCH-$BUILD.tgz fi
July 24, 201015 yr Author I've posted some more new Utility webGui plugins on the googlecode site. http://code.google.com/p/unraid-webgui/downloads/list These are all beta and subject to change rapidly. It's a work in progress figuring out what you can and cannot do via emhttp. Consider these a model for your more advanced plugins. I'm tired so here is a very brief summary. utils+webGui-1.0.1-unRAID-WeeboTech.tgz - BETA Installable Slackware Package for new utility functions in Utils webGui menu (A Slew of small utility functions, Yet it provides an idea of what you are able to do). psutils+webGui-1.0.1-unRAID-WeeboTech.tgz BETA Installable Slackware Package for new process monitor tools in webGui menu - Think top on your browser with grep, also has pstree. syslogmon+webGui-1.0.1-unRAID-WeeboTech.tgz BETA Installable Slackware Package for new syslog monitor tab in webGui menu - Like the syslog viewer on a small dose of steroids. I have high hopes for this one. Right now it display the syslog lines in reverse order (for 1024 lines). You can grep only the lines you want. There is the ability to filter out lines you do not want all the time in /etc/syslogmon/exclude There are buttons there which are not ready. autorefresh (Filter works). Acknowledge will be to set a mark point saying only read messages from this point forward. Truncate (should be obvious). Archive (do what the shutdown archiving procedure does). Edit Filter (not ready yet). I also plan to have a cron job that will work in sync with the exclude filter and acknowledge point subsystem. At programmed intervals messages from syslog will be filtered via the /etc/syslogmon/exclude filter and mailed to the adminstrator. The Acknowledge point will be updated and at the next interval the same procedure will occur. This allows the most current messages to be on the syslog monitor. Once the messages are mailed, the monitor go from that point forward. I'll probably add something to reset the acknowledge pointer. The idea is if you have a monitor on syslog you can see the most current events. I think the mailing subsystem will need to wait for the event callouts. I need a way to configure and save/restore the updates to flash at the respective times. I'll add colorizing in the future along with a quick way to click a line and have it editable for insertion into the filter. The filter is all manual right now. Once BubbaQ and I work out a webGui editor, the filter will be exposed. Once I learn more on interacting with webGui I'll update the filter via administrative selection. It's all a moving target right now but it gives you an idea of what is capable (from a lowly non designer)
Archived
This topic is now archived and is closed to further replies.