-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Gollum as a service
jn64 edited this page Jun 18, 2023
·
19 revisions
Example service files are provided in contrib
See contrib/systemd
for example
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
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.
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
.
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, and -
GOLLUM_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
.
See contrib/openrc
for example
A script to run it on FreeBSD as daemon can be found in www/rubgem-gollum
port