git.sophuwu.com > manhttpd
touches
sophuwu sophie@sophuwu.com
Sat, 12 Jul 2025 22:45:11 +0200
commit

4ad228bfd35082fea75a43064beb2a42338508c5

parent

a134b32c433275c9df1266d260939e521b71f783

4 files changed, 19 insertions(+), 12 deletions(-)

jump to
M CFG/etc.conf.goCFG/etc.conf.go

@@ -25,7 +25,7 @@ Hostname: "",

Port: "8082", Addr: "0.0.0.0", RequireAuth: false, - PasswdFile: "/etc/manhttpd/passwd", + PasswdFile: "/var/lib/manhttpd/authuwu", TldrPages: false, EnableStats: false, StatisticDB: "/var/lib/manhttpd/stats.db",
A extra/manhttpd.conf

@@ -0,0 +1,8 @@

+#hostname +port 8082 +addr 0.0.0.0 +require_auth no +passwd_file /var/lib/manhttpd/authuwu +tldr_pages no +enable_stats no +statistic_db /var/lib/manhttpd/stats.db
M extra/manhttpd.serviceextra/manhttpd.service

@@ -3,19 +3,13 @@ Description=front end service for parsing man into html over http

After=network.target [Service] -# Path to the command binary -ExecStart=/usr/bin/manhttpd -# Recommended to use /tmp as the working directory since data is not saved -WorkingDirectory=/tmp -Type=simple - +ExecStart=/usr/bin/manhttpd /etc/manhttpd/manhttpd.conf -#Environment="ListenPort=" -#Environment="ListenAddr=" -#Environment="MANDOCPATH=" -#Environment="HOSTNAME=" +WorkingDirectory=/var/lib/manhttpd +Type=simple -#User= +User=manhttpd +Group=manhttpd [Install] WantedBy=multi-user.target
M extra/postinstall.shextra/postinstall.sh

@@ -11,6 +11,11 @@ mkdir -p /var/lib/manhttpd

fi chown manhttpd:manhttpd /var/lib/manhttpd +if [[ -f /etc/manhttpd/manhttpd.conf ]]; then + mv /etc/manhttpd/manhttpd.conf /etc/manhttpd/manhttpd.conf.bak + printf "%s %s\n" "hostname" "$(hostname)" >> /etc/manhttpd/manhttpd.conf +fi + systemctl daemon-reload systemctl enable manhttpd systemctl start manhttpd