Skip to content

Instantly share code, notes, and snippets.

@r14c
Last active August 29, 2015 14:12
Show Gist options
  • Save r14c/5732405caa60eccdc85c to your computer and use it in GitHub Desktop.
Save r14c/5732405caa60eccdc85c to your computer and use it in GitHub Desktop.
Gogs SMF Manifest
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest"
name="export">
<service name="application/gogs"
type="service"
version="1">
<create_default_instance enabled="false" />
<single_instance />
<dependency name="network"
grouping="require_all"
restart_on="error"
type="service">
<service_fmri value="svc:/milestone/network:default" />
</dependency>
<dependency name="filesystem"
grouping="require_all"
restart_on="error"
type="service">
<service_fmri value="svc:/system/filesystem/local" />
</dependency>
<exec_method type="method"
name="start"
exec="/home/git/.local/bin/start-gogs.sh"
timeout_seconds="60">
<method_context working_directory="/home/git/.go/src/github.com/gogits/gogs">
<method_credential user="git" group="other" />
<method_environment>
<envvar name="HOME" value="/home/git" />
<envvar name="PATH" value="/bin:/usr/bin:/usr/local/bin:/opt/local/bin:/home/git/.go/bin" />
<envvar name="GOPATH" value="/home/git/.go" />
</method_environment>
</method_context>
</exec_method>
<exec_method type="method"
name="stop"
exec=":kill"
timeout_seconds="60">
<method_context/>
</exec_method>
<property_group name="startd" type="framework">
<propval name="duration" type="astring" value="contract" />
<propval name="ignore_error" type="astring" value="core,signal" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Gogs: Go Git Service</loctext>
</common_name>
</template>
</service>
</service_bundle>
#!/opt/local/bin/zsh
$GOPATH/github.com/gogits/gogs/gogs web &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment