Setting up systemd

We use `systemd` to start wiki on crash or reboot.

/etc/systemd/system/wiki.service

[Unit] Description=wiki - federated wiki Documentation=http://admin.asia.wiki.org After=network.target [Service] Environment=HOME=/root Type=simple User=root ExecStart=/usr/bin/wiki --config /root/google.config.json -f Restart=on-failure [Install] WantedBy=multi-user.target

We instruct systemd to read, start and ready reboot.

systemctl daemon-reload systemctl start wiki systemctl enable wiki

We read the server's log.

journalctl -u wiki journalctl -u wiki --since='1 hour ago'