Skip to content

Instantly share code, notes, and snippets.

@Marenz
Created June 3, 2016 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marenz/b25c84478620c7dc00801b23658ad3f0 to your computer and use it in GitHub Desktop.
Save Marenz/b25c84478620c7dc00801b23658ad3f0 to your computer and use it in GitHub Desktop.
[Unit]
Description=Foswiki
[Service]
Environment=FOSWIKI_ROOT=/var/www/foswiki
Environment=FOSWIKI_FCGI=foswiki.fcgi
Environment=FOSWIKI_BIND=127.0.0.1:9000
Environment=FOSWIKI_CHILDREN=3
Environment=FOSWIKI_MAX_REQUESTS=-1
Environment=FOSWIKI_MAX_SIZE=250000
Environment=FOSWIKI_CHECK_SIZE=10
Environment=FOSWIKI_QUIET=true
Environment=FOSWIKI_PIDFILE=/var/run/foswiki.pid
# Optional, overrides settings above
EnvironmentFile=-/etc/default/foswiki
# Doesn't seem to support variable substitution. Should be ${FOSWIKI_ROOT}/bin/
WorkingDirectory=/var/www/foswiki/bin/
ExecStart=/usr/bin/perl ${FOSWIKI_ROOT}/bin/${FOSWIKI_FCGI} \
-n $FOSWIKI_CHILDREN \
-l $FOSWIKI_BIND \
-p $FOSWIKI_PIDFILE \
-c $FOSWIKI_CHECK_SIZE \
-x $FOSWIKI_MAX_REQUESTS \
-s $FOSWIKI_MAX_SIZE \
-d
Type=forking
PIDFile=$FOSWIKI_PIDFILE
Restart=always
SyslogIdentifier=foswiki
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment