1
0
Commit Graph

303 Commits

Author SHA1 Message Date
afbaad971a
Instantiate log file handle and an instance of log.Logger. Also remove reopen SIGHUP handler. Log file will be truncated with logrotate instead of recreating. 2023-05-25 02:25:43 +04:00
fccb81d3a5
Added | separator to the start of all log.Printf() to separate date and action. 2023-05-25 02:24:00 +04:00
3327b30d12
Replaced logging.Logger with std log.Logger. 2023-05-25 02:22:56 +04:00
59544da625
Removed configPath flag from main. 2023-05-25 02:17:27 +04:00
85529890a5
Oh, code for deletion statistics also should be purged. 2023-05-25 02:13:33 +04:00
9510027d05
Replace flags in a clean service with the new ones. 2023-05-25 02:11:20 +04:00
55ba1fd67d
Do not log how much files was deleted. Useless info, keep only error logs.
And removed configPath flag as well.
2023-05-25 02:10:35 +04:00
203c0158ce
Install gen-salt.sh as dwelling-upload-gen-salt. 2023-05-25 00:58:02 +04:00
282a00c328
Found that daemon-reload needs to be called when manually edit such files. 2023-05-25 00:57:36 +04:00
99eed674fc
Since we now run setup command from script, this caution doesn't needed. 2023-05-25 00:53:35 +04:00
cf7e240e8a
Let's add the creds to override.conf, actually. And it is safe to run systemd-creds setup, since it doesn't rewrite an existing key. 2023-05-25 00:52:51 +04:00
705a4ede76
Updated comments in upload.service. 2023-05-25 00:49:30 +04:00
dab675474a
Set default NotFound handler. 2023-05-25 00:47:32 +04:00
3f79eb5b08
Added SetCredentialEncrypted= and a comment. 2023-05-25 00:14:24 +04:00
f0fc34c8e7
Remove func NotFound. 2023-05-25 00:09:30 +04:00
2ef85c6f29
Handle cURL and Wget clients. 2023-05-25 00:08:52 +04:00
b16ec84e86
Added missing return in free space check. 2023-05-24 23:57:02 +04:00
f8351b935d
Moved WriteHeader to nospace.jade. 2023-05-24 23:56:12 +04:00
64132ec18f
Removed missed w.WriteHeader(). 2023-05-24 23:52:33 +04:00
fb9cee2c0a
A new Error() handler used. 2023-05-24 23:50:49 +04:00
185bd80750
error50x made into universal error page. Also Error() handler was made that checks for cURL and Wget, and if find, then use built-in plaintext http.Error, and web.errorXXX otherwise. 2023-05-24 23:50:10 +04:00
a04adf7fa1
Replaced http.Error with 50x errors with web.Error50x(). 2023-05-24 23:20:21 +04:00
6e9ad9323c
Added error50x template. 2023-05-24 23:20:05 +04:00
06dfcaac8e
Removed excessive wtih word in index.jade. 2023-05-24 23:09:47 +04:00
35468af206
In web/*.jade.go target perform check for changes in templates. 2023-05-24 23:09:16 +04:00
3696e1dfe1
Also, gen-salt demands to be runned under root, so let's check for it and fail if it doesn't. 2023-05-24 22:58:32 +04:00
14ec537d82
And, let's change line wrapping here. 2023-05-24 22:49:36 +04:00
14efad4a4a
Rewrote gen-salt.sh in a right way. 2023-05-24 22:48:28 +04:00
9c5bad04d4
Made a new target to generate templates only when they are missing. Also put go install jade in it. Hence, no need in check in the PKGBUILD. 2023-05-24 22:40:06 +04:00
21d05e7488
Remove *.jade.go as well on clean target in Makefile. 2023-05-24 22:29:40 +04:00
ec2656c719
jade.go is being automatically generated, so no need to keep it. Also removed unneeded flags from go:generate in web.go. 2023-05-24 22:28:36 +04:00
b95052709a
Removed upload.yaml from Makefile and PKGBUILD. Removed run and run-clean targets. 2023-05-24 22:25:19 +04:00
af0492e5a0
Version's week part incremented. 2023-05-24 22:23:05 +04:00
57aea7ef77
Added gen-salt.sh to generate and get a SetCredentialEncrypted= to put in a systemd service. 2023-05-24 22:22:11 +04:00
badeda87ad
No need in gopkg.in/yaml.v3 anymore. 2023-05-24 22:21:08 +04:00
cc1cbeffcd
Removed config.yaml. 2023-05-24 22:20:22 +04:00
332e9a1bb3
Removed Configuration. 2023-05-24 22:20:02 +04:00
931f98d12e
Made use of cmd arguments. 2023-05-24 22:19:41 +04:00
11dfbfbc23
Added flags that replace config file. 2023-05-24 22:11:28 +04:00
470bbb04ee
Get file.log path as join of its name and LOGS_DIRECTORY env var. 2023-05-24 22:10:57 +04:00
deed268b4f
Get config passed as cmd args instead. 2023-05-24 22:09:41 +04:00
33f69eaf44
Changed error logging for upload-clean as well. 2023-05-24 22:09:04 +04:00
c85c6555e2
Log errors to stdout (systemd-journal) instead of a separate file. Also updated error messages. And since journal already puts a date, use only a Llongfile flag to print a place where an error occured. 2023-05-24 21:45:46 +04:00
c43c314a78
Pass listen address as a -listen argument. Use the new code to parse a parameter. 2023-05-24 21:26:48 +04:00
ce6d81ad55
Added /f/ to robots.txt. 2023-05-24 02:57:41 +04:00
88ec5e5efe
Added missing io.Writer in a call of web.Deleted. 2023-05-21 22:24:36 +04:00
33ec19647b
Reworked logging. Store all actions in one file.log. 2023-05-21 21:27:44 +04:00
31d2c4fd21
Let's, actually, directly assign to uploadDirSize. 2023-05-21 21:12:23 +04:00
7e1b56bbc5
Version's week part was incremented. 2023-05-21 20:53:24 +04:00
50ca035a1f
Uhm... Don't recall why, but nonetheless, this is why size wasn't being updated when there were no files left. 2023-05-21 20:53:03 +04:00