Gollum as a service - gollum/gollum GitHub Wiki
Example service files are provided in contrib
systemd
See contrib/systemd
for example
System service
To run Gollum as a system service:
- Create a
gollum.service
file. - Add a
ExecStart=...
line. This line specifies the location of gollum executable and arguments to run it with. Use Gollum README orgollum --help
to display the list of available arguments.
Example:ExecStart=/usr/local/bin/gollum --show-all "/home/someuser/wiki/"
- Start the service:
[sudo] systemctl start gollum.service
System service, run under a particular user
To run Gollum as a system service, but under a particular user (root by default):
- Add a
User=%i
line togollum.service
file and rename the file to[email protected]
. - Change the line
ExecStart=/usr/local/bin/gollum --show-all "/home/someuser/wiki/"
toExecStart=/usr/local/bin/gollum --show-all "/home/%i/wiki/"
. - Start the service:
[sudo] systemctl start gollum@<target-user>.service
, where<target-user>
is the user to run Gollum under.
User service
To run the service in a user session:
- Complete the first two steps of making a system service (see above).
- Create the
mkdir -p ~/.config/systemd/user/
folder and move thegollum.service
file there. Editgollum.service
as needed. - Start the user service via
[sudo] systemctl --user start gollum
.
SysV
See contrib/sysv-debian
for example
To install it:
- Copy
contrib/sysv-debian/init.d/gollum
to/etc/init.d/
on your system. - Adapt the
GOLLUM_*
variables to your needs:GOLLUM_USER
sets the user thegollum
process will be run as,GOLLUM_BASE
sets the path to the repository that contains the wiki contents, andGOLLUM_OPTS
allows you to set additional parameters passed togollum
on the commandline (seegollum --help
for documentation on those).
- Make the script executable if it isn't already:
chmod +x /etc/init.d/gollum
- Depending on your system, use
service gollum start
or/etc/init.d/gollum start
to start Gollum. The script understands the parametersstart
,stop
,restart
, andstatus
.
OpenRC
See contrib/openrc
for example
FreeBSD
A script to run it on FreeBSD as daemon can be found in www/rubgem-gollum
port