1
0
Commit Graph

83 Commits

Author SHA1 Message Date
7c9ad434cb
Added run-clear to Makefile. 2022-02-08 23:59:24 +04:00
bb3a64d334
Chroot for dwelling-upload-clean. 2022-02-08 23:12:53 +04:00
1212915bf6
Added comments for options.
Fixed a typo clean ->clear.
2022-02-08 23:09:19 +04:00
ad336b03e2
Fixed a typo in config. 2022-02-08 23:08:37 +04:00
a9a82868ca
Chrooting. 2022-02-08 23:08:03 +04:00
a78001bf22
Added a chroot option. 2022-02-08 22:48:56 +04:00
3a1e044b6d
Clean up the code a little. 2022-02-08 22:48:05 +04:00
4a5f54ee70
Properly form a download URL. 2022-02-08 19:21:44 +04:00
c884fe8225
Let's check if client is curl and return just a link.
And NetworkType() returns a scheme as well now.
2022-02-08 19:02:37 +04:00
0e46641599
Fixed link to a font. 2022-02-08 19:00:55 +04:00
ffe60bae85
Host can have :port attached, so it is better to check if string contains rather ends with a particular TLD. 2022-02-08 19:00:37 +04:00
7b5b9a7ce8
Changed site description. 2022-02-08 18:59:23 +04:00
e2b2758b34
Removed dir arg from compileTemplates(). 2022-02-08 18:26:20 +04:00
4b8cc9060e
Removed WebDir option. 2022-02-08 18:25:54 +04:00
424a42b3db
All is embed, so web_dir is not needed anymore. 2022-02-08 18:25:32 +04:00
381a0dcc98
Jade can work with embed FS, so we do that. 2022-02-08 17:46:44 +04:00
94437e3bab
Serve embed assets fs instead. 2022-02-08 17:46:16 +04:00
967e8e6878
Added font Roboto Condensed. 2022-02-08 17:45:45 +04:00
61dae0e57f
Moved web dir inside internal/handlers for go:embed. 2022-02-08 17:44:49 +04:00
ebc4442540
New Jade templates. 2022-02-08 04:24:20 +04:00
907bdeffcc
Updated CSS style. 2022-02-08 04:24:04 +04:00
e529bfa353
Amber is replaced with Jade. 2022-02-08 04:23:38 +04:00
b2a5e90245
Remove Amber from dependencies. 2022-02-08 04:23:05 +04:00
435c32c500
Remove Amber templates. 2022-02-08 04:22:41 +04:00
29931cca2f
Removed .Hours().
Reduced logClean output.
2022-02-08 02:35:48 +04:00
338b153aa1
Inotify works when it is an array. Experimentally was found that 16 events is enough. 2022-02-08 02:13:15 +04:00
bf0595453c
Creating a sparse file, because on file create an inotify will produce an event and dir size will be recalculated, so it can get an actual size. 2022-02-08 02:12:01 +04:00
ddaf2bb991
Add addtional closeSignal chan for program to wait for. 2022-02-08 02:05:38 +04:00
0c05ffeef6
Add a space between size and unit. 2022-02-08 01:52:27 +04:00
8e44aa1477
Oops, forgot to return FSWatcher. And remove that syscall.Read. 2022-02-08 00:39:25 +04:00
e45bb01f49
Use inotify fs watcher. Also shorten errors msg for loggers instantiation. 2022-02-08 00:26:59 +04:00
9a4461ac4e
Now instead of computing dir size on every request use a variable that is updated using inotify. 2022-02-08 00:25:50 +04:00
f7390b0763
Wrap an error message. Return 0 size on error. 2022-02-08 00:24:57 +04:00
04dedc5f5c
Inotify file system watching for linux. 2022-02-08 00:23:40 +04:00
6a8da44ee5
Superior 404 template. xDDD 2022-02-07 23:10:10 +04:00
3b851637e5
Added blocks head and header in base.amber. 2022-02-07 23:09:49 +04:00
d9adf74608
Handle NotFound error in Download(). 2022-02-07 23:09:18 +04:00
d893a9492b
A NotFound page template. 2022-02-07 22:52:20 +04:00
de77530962
Set NotFound handler in main. 2022-02-07 22:52:01 +04:00
8fdf0b61e2
Added NotFound handler.
Removed commented out content-type header.
2022-02-07 22:51:47 +04:00
a5f73e0d60
A new SetNotFoundHandler() method for server. 2022-02-07 22:50:46 +04:00
8a4104c3d5
Remove all debugging calls. 2022-02-07 22:27:34 +04:00
be37f74317
Storage size computing moved off to utils.DirectorySize(). 2022-02-07 22:18:22 +04:00
36b0dc7b4d
DirectorySize() func to get size of all files inside. 2022-02-07 22:17:40 +04:00
7ac1c2ccb9
Removed excessive vars from SplitNetworkAddress(). 2022-02-07 22:08:02 +04:00
ed3b0080a3
Moved substituting user to a func for upload-clear. 2022-02-07 22:04:40 +04:00
38ec161ae9
Moved substituting user to a func for upload. 2022-02-07 22:04:00 +04:00
f3685c999e
An octal repr of permissions is supposed to be used here for working correctly. 2022-02-07 21:50:38 +04:00
f92267a288
Added optional writing to stdout. 2022-02-07 21:24:54 +04:00
17152581a9
Added ToStdout, Clean, and CleanError to Log. 2022-02-07 21:24:25 +04:00