imprve admin manual

This commit is contained in:
Ted Unangst 2019-11-06 13:26:35 -05:00
parent fe1ef8d89e
commit ef507154d5
1 changed files with 26 additions and 17 deletions

View File

@ -67,18 +67,10 @@ Defaults to ".".
Run the Run the
.Ic init .Ic init
command. command.
.Dl ./honk init
This will create the database and ask four questions, as well as creating This will create the database and ask four questions, as well as creating
the initial user. the initial user.
.Bd -literal -offset indent
username: (desired username)
password: (desired password)
listenaddr: (tcp or unix: localhost:31337, /var/www/honk.sock, etc.)
servername: (public DNS name: honk.example.com)
.Ed
.Ss OPERATION .Ss OPERATION
Run honk. Run honk.
.Dl date; ./honk >> log 2>&1
Log messages are sent to stderr and should probably be redirected to a file. Log messages are sent to stderr and should probably be redirected to a file.
.Ss CUSTOMIZATION .Ss CUSTOMIZATION
Add custom memes (stickers) to the Add custom memes (stickers) to the
@ -100,7 +92,6 @@ Custom HTML messages may be added to select pages by using the
.Ic admin .Ic admin
command. command.
A restart is required after changes. A restart is required after changes.
.Dl ./honk admin
.Bl -tag -width tenletters .Bl -tag -width tenletters
.It server .It server
Displayed on the home page. Displayed on the home page.
@ -115,30 +106,24 @@ New users can be added with the
.Ic adduser .Ic adduser
command. command.
This is discouraged. This is discouraged.
.Dl ./honk adduser
.Pp .Pp
Passwords may be reset with the Passwords may be reset with the
.Ic chpass .Ic chpass Ar username
command. command.
.Dl ./honk chpass username
.Ss MAINTENANCE .Ss MAINTENANCE
The database may grow large over time. The database may grow large over time.
The The
.Ic cleanup .Ic cleanup Op Ar days
command exists to purge old data, by default 30 days. command exists to purge old data, by default 30 days.
This removes unreferenced, unsaved posts and attachments. This removes unreferenced, unsaved posts and attachments.
It does not remove any original content. It does not remove any original content.
.Ss UPGRADE .Ss UPGRADE
Stop the old honk process. Stop the old honk process.
.Dl pkill honk
Backup the database. Backup the database.
.Dl cp honk.db backup.db
Perform the upgrade with the Perform the upgrade with the
.Ic upgrade .Ic upgrade
command. command.
.Dl ./honk upgrade
Restart. Restart.
.Dl ./honk
.Pp .Pp
There's also a There's also a
.Pa blob.db .Pa blob.db
@ -181,6 +166,30 @@ The view directory contains:
.It Pa views .It Pa views
HTML templates and CSS files. HTML templates and CSS files.
.El .El
.Sh EXAMPLES
This series of commands creates a new database, sets a friendly
welcome message, and runs honk.
.Bd -literal -offset indent
honk-v98> make
honk-v98> ./honk -datadir ../honkdata init
username: puffy
password: OxychromaticBlowfishSwatDynamite
listen address: /var/www/honk.sock
server name: honk.example.com
honk-v98> ./honk -datadir ../honkdata admin
honk-v98> date; ./honk -datadir ../honkdata >> log 2>&1
.Ed
.Pp
Upgrade to the next version.
Clean things up a bit.
.Bd -literal -offset indent
datadir> cp honk.db backup.db
datadir> cd ../honk-v99
honk-v99> make
honk-v99> ./honk -datadir ../honkdata upgrade
honk-v99> ./honk -datadir ../honkdata cleanup
honk-v99> date; ./honk -datadir ../honkdata >> log 2>&1
.Ed
.Sh ENVIRONMENT .Sh ENVIRONMENT
Image processing and scaling requires considerable memory. Image processing and scaling requires considerable memory.
It is recommended to adjust the datasize ulimit to at least 1GB. It is recommended to adjust the datasize ulimit to at least 1GB.