V
V
Vlad Zaitsev2012-08-05 17:08:30
linux
Vlad Zaitsev, 2012-08-05 17:08:30

How to execute script after http request?

android, busybox, bash. you need to execute the script after the remote command, let's say an http request.
script (I know it's a crutch): busybox microcom -t 2000 /dev/ttyUSB0 & sleep 1; echo "gr" >/dev/ttyUSB0
which is:
[, [[, ash, awk, base64, basename, blkid, bunzip2, bzcat, bzip2, cal, cat, chat, chattr, chgrp, chmod, chown, chroot, chrt , cksum, clear,
comm, cp, crond, crontab, cut, date, dd, depmod, devmem, df, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, dpkg, dpkg-deb, du, echo,
egrep, env , ether-wake, expand, expr, fakeidentd, fdflush, fdformat, fdisk, fgrep, find, fold, free, freeramdisk, fsck, fsync, ftpd, ftpget,
ftpput, getopt, grep, groups, gunzip, gzip, hd, head, hexdump, hostid, hostname, httpd, hwclock, id, ifconfig, ifenslave, inetd, inotifyd,
insmod, install, ionice, iostat, ip, ipaddr, ipcalc, iplink, iproute, iprule, iptunnel, kill, killall, killall5, less, ln, logname, losetup,
ls, lsattr, lsmod, lsof, lsusb, lzop, lzopcat, md5sum, microcom, mkdir, mkdosfs, mke2fs, mkfifo, mkfs. ext2, mkfs.vfat, mknod, mkswap,
modinfo, modprobe, more, mount, mountpoint, mt, mv, nameif, nanddump, nandwrite, nc, netstat, nice, nmeter, nslookup, ntpd, od, patch,
pgrep, pidof, ping, ping6, pkill, pmap, powertop, printenv, printf, ps, pscan, pwd, rdate, rdev, readahead, readlink, realpath, renice,
reset, rev, rfkill, rm, rmdir, rmmod, route, run-parts, script, scriptreplay, sed, seq, setkeycodes, setlogcons, setsid, sha1sum, sha256sum,
sha512sum, showkey, sleep, smemcap, sort, split, stat, strings, stty, sum, swapoff, swapon, sync, sysctl, tac, tail, tar, tee, telnet,
telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, tty, ttysize, tunctl, umount, uname, uncompress,
unexpand, uniq, unix2dos, unlzop, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, watch, wc, wget, which, who, whoami, whois, xargs,
zcat

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
V
Vladimir, 2012-08-05
@vvzvlad

you already have a web server (httpd) as part of the businessbox.
it remains to run it and set it on the folder with scripts.
for example, create a folder /www/cgi-bin/
and in it a script with the desired operation:

#!/bin/sh
echo "Content-type: text/html"
echo ""
echo "<html><header></header><body>"
echo "<h1>Test</h1>"
echo "</font></pre>"
echo "</body></html>"

it remains to start the server:
httpd -p80 -d /www
and you can try;)

F
Fortop, 2012-08-05
@Fortop

the easiest way is to set up a web server :) and set up CGI
and in php5.4 it is generally built-in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question