Start meguca on boot
Meguca is an open source annonymouse imageboard written in Go Lang and Node.js
https://github.com/bakape/meguca
To start Meguca on boot, you can use monit
Create a monitoring script with
1 2 3 4 5 6 7 8 |
check process meguca with pidfile /meguca/.pid start program = "/bin/su -c 'cd /meguca; ./meguca start' meguca" stop program = "/bin/su -c 'cd /meguca; ./meguca stop' meguca" if failed port 8000 protocol HTTP request /api/health-check with timeout 10 seconds then restart |
/meduca is where Meguca is installed.
Create a config.json file with
1 |
vi /meguca/config.json |
Add following content
1 2 3 4 5 6 7 8 9 10 11 |
{ "ssl": false, "reverseProxied": true, "gzip": false, "imagerMode": 0, "cacheSize": 128, "address": "127.0.0.1:8000", "database": "user=meguca password=meguca dbname=meguca sslmode=disable", "certPath": "", "reverseProxyIP": "" } |
reverseProxied is set to true because my installation is behind reverse proxy (CloudFlare).
Make changes to config settings as requires.
Create a user
1 |
useradd -m -s /bin/bash meguca |
Change ownership of meguca files
1 |
chown -R meguca:meguca /meguca |