MEWBIES@: Facebook Twitter G+ YouTube DeviantArt Forum Wall
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██ ██
█▌ - UNZIP A ZIP VIA SITE CMD - █▌
█▌ █▌
█ ▐▌
█ Simple script so that users may extract a zip file into the directory. ▐▌
█ I've altered sitezipchk.sh (from glFTPD) to create this, site cmd is: ▐▌
█ site unzip [file.zip] ▐▌
█ ▐▌
█ SCRIPT TO EXTRACT A ZIP: ▐▌
█ ```````````````````````` ▐▌
█ To use this download the script from HERE, or in your shell: ▐▌
cd ~
wget http://mewbies.com/glftpd_scripts_mewbies/Extract.Zip.Files.Via.Site.cmd.for.glFTPd-MWB/mwbezfg1.zip
unzip mwbezfg1.zip -d ~/mwbezfg1 && cd mwbezfg1
which sh
pico unzip.sh
█ If the location of your sh is not #!/bin/sh change the path, save changes. ▐▌
█ Check that you have binaries unzip and echo in glftpd/bin and the perms ▐▌
█ are 755 (-rwxr-xr-x): ▐▌
█ ls -l /jail/glftpd/bin/unzip /jail/glftpd/bin/echo ▐▌
█ If not find those and copy to that path and chmod 755: ▐▌
█ which unzip echo ▐▌
█ su ▐▌
█ cp unzip.sh /jail/glftpd/bin/unzip.sh ▐▌
█ chmod 755 /jail/glftpd/bin/unzip.sh ▐▌
█ pico /jail/glftpd/etc/glftpd.conf ▐▌
█ Add the site cmd: ▐▌
█ site_cmd UNZIP EXEC /bin/unzip.sh ▐▌
█ custom-unzip !8 * ▐▌
█ ▐▌
█ Test it; logout of site, login: site unzip xxxxxxxx.zip ▐▌
█ ▐▌
█ ADD NEW CMD TO NEWS OR SITE HELP: ▐▌
█ SITE NEWS: ▐▌
█ pico /jail/glftpd/ftp-data/misc/newsfile ▐▌
█ ▐▌
█ SITE HELP: ▐▌
█ pico /jail/glftpd/ftp-data/help/site.help.all ▐▌
█ Paste this in (don't hit enter after the last line or there will be a gap):▐▌
█ !D!5 UNZIP!B!5:!h!5 To extract a zip file site unzip <filename.zip> ▐▌
█ ▐▌
█ exit ▐▌
█ ▐▌
█ //---------------------------------------------------------------------- ▐▌
█ ▐▌
█ If you find mistakes, have suggestions, and or questions please post at ▐▌
█ mewbies forum HERE - thank you. ▐▌
█ ▐▌
█ Last update on 19 Jul '10 ▐▌
█ ▐▌
█▌ █▌
█▌ - mewbies.com - █▌
█▌ █▌
██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██