make install
This commit is contained in:
parent
360623154d
commit
5a7db107ae
26
Makefile
26
Makefile
|
@ -9,9 +9,29 @@ clean:
|
|||
-rm bin/geml-server
|
||||
|
||||
install: bin/geml-server
|
||||
cp bin/geml-server /usr/local/bin/geml-server
|
||||
#cp geml.service /etc/systemd/system
|
||||
id -u geml &>/dev/null || useradd geml --system
|
||||
install \
|
||||
--target-directory /usr/local/bin/ \
|
||||
--mode 744 \
|
||||
--owner geml \
|
||||
--group geml \
|
||||
bin/geml-server
|
||||
install \
|
||||
--target-directory /etc/systemd/system/ \
|
||||
--mode 644 \
|
||||
--owner geml \
|
||||
--group geml \
|
||||
geml.service
|
||||
mkdir -p /etc/geml/
|
||||
install \
|
||||
--target-directory /etc/geml/ \
|
||||
--owner geml \
|
||||
--group geml \
|
||||
--mode 644 \
|
||||
geml.ini
|
||||
|
||||
uninstall:
|
||||
id -u geml &>/dev/null && userdel geml
|
||||
rm /usr/local/bin/geml-server
|
||||
#rm /etc/systemd/system/geml.service
|
||||
rm /etc/systemd/system/geml.service
|
||||
rm -rf /etc/geml/
|
||||
|
|
38
README.md
38
README.md
|
@ -34,6 +34,32 @@ openssl req -x509 \
|
|||
|
||||
## Usage
|
||||
|
||||
### Standalone Executable
|
||||
|
||||
To get an executable `bin/geml-server` run `make`.
|
||||
|
||||
```sh
|
||||
make && bin/geml-server -h
|
||||
```
|
||||
|
||||
### Systemd
|
||||
|
||||
Install the build to `/usr/local/bin/geml-server` with
|
||||
`sudo make install` which will also wire up systemd so you can `sudo systemctl
|
||||
enable --now geml`
|
||||
|
||||
You'll need to `sudo systemctl restart geml` whenever you update
|
||||
`/etc/geml/geml.ini`... you did do that didn't you?
|
||||
|
||||
### yeet it
|
||||
|
||||
To undo all that run these:
|
||||
|
||||
```sh
|
||||
sudo make uninstall
|
||||
make clean
|
||||
```
|
||||
|
||||
### SBCL
|
||||
|
||||
Start sbcl with proper readline support: `rlwrap sbcl`
|
||||
|
@ -42,15 +68,3 @@ Start sbcl with proper readline support: `rlwrap sbcl`
|
|||
(ql:quickload "geml")
|
||||
(gemini.server:start-server "/etc/geml/geml.ini")
|
||||
```
|
||||
|
||||
### Standalone Executable
|
||||
|
||||
To get a `geml-server` binary run:
|
||||
|
||||
```sh
|
||||
./build.sh && ./bin/geml-server -h
|
||||
```
|
||||
|
||||
### Systemd
|
||||
|
||||
- [ ] geml.service
|
||||
|
|
10
geml.service
Normal file
10
geml.service
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Gemini Server written in Common Lisp
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=geml
|
||||
ExecStart=/usr/local/bin/geml-server --config /etc/geml/geml.ini
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue