Tiny Core Base > CorePlus
autostart SimpleHTTPServer
okanagansage:
I'm going to try to wrap my head around this (I've been reading this:
http://www.parkytowers.me.uk/thin/Linux/TinycoreWS.shtml
When tinycore boots, it looks in attached storage for the tce directory which contains any option extensions I've installed. Those extensions on the storage medium are actually compressed storage file systems. So in
/mnt/sdb2/tce/optional/
it is finding python.tcz and python.tcz.dep and python.tcz.md5.txt ...
Then it mounts python.tcz at /tmp/tmloop/python
So if I go to
/tmp/tcloop/python/usr/local/lib/
I find two files and a folder:
libpython2.7.so libpython2.7.so.1.0 python2.7/
AND IN python2.7/ IS >>> SimpleHTTPServer.py
I don't know why the command
--- Code: ---sudo locate SimpleHTTPServer
--- End code ---
or
--- Code: ---sudo locate SimpleHTTPServer.py
--- End code ---
does not find these files. Maybe it doesn't search in /tmp .
So...
/mnt/sdb2/tce/optional/python.tcz
is mounted to
/tmp/tcloop/python/
and that tmp directory is merged into the main system.
That means
/tmp/tcloop/python/usr/local/lib/python2.7/
is also located at
/usr/local/lib/python2.7/
Which it is.
I think I've just about got this.
I'm going to read a bit more and I'll post what I find.
Edit: That's weird. When I replied to Rich in the previous post I said that python wasn't in /usr/local/lib/
If it was installed as an onboot program, shouldn't it be there even before running the following command?
--- Code: ---python -m SimpleHTTPServer
--- End code ---
okanagansage:
So it turns out that just adding
--- Code: ---python -m SimpleHTTPServer
--- End code ---
to /opt/bootlocal.sh works but if I try adding this to /opt/bootlocal.sh:
--- Code: ---cd Documents && python -m SimpleHTTPServer
--- End code ---
it doesn't work.
Either does
--- Code: ---cd /home/tc/Documents && python -m SimpleHTTPServer
--- End code ---
curaga:
You can record the error messages:
cd /home/tc/Documents && python -m SimpleHTTPServer > /tmp/pyerr 2>&1
bmarkus:
Maybe I misunderstand the issue, but there are no such thing as SimpleHTTPServer you can start. It is a Python modul what you can use to include SimpleHTTPServer to an application. You can start this apllication, but not SimpleHTTPServer. Pelase see
https://docs.python.org/2.7/library/simplehttpserver.html#module-SimpleHTTPServer
okanagansage:
Thanks for your suggestions. I've got this working at boot so I'm going to consider this solved.
I want to bring this wyse into the recycling depot soon and I still want to try out some command line music players.
Thanks again.
Paul
Navigation
[0] Message Index
[*] Previous page
Go to full version