Sha256: 62dbed3ccf6f3f2edbfb0620563b40389d8cc1b8a0499f58a79e610e90f8129a

Contents?: true

Size: 837 Bytes

Versions: 3

Compression:

Stored size: 837 Bytes

Contents

include "../package2/package2.sfp"
include "../service2/service2.sfp"

schema Apache2 {
	installed : Bool
	running : Bool

	package isa Package2 {
		name = "apache2"
		version = "latest"
		provider = "apt"

		synchronized sub install {
			condition {
				this.parent.installed != true
			}
			effect {
				this.parent.installed = true
				this.parent.running = true
			}
		}
		synchronized sub uninstall {
			condition {
				this.parent.installed = true
				this.parent.running = false
			}
			effect {
				this.parent.installed = false
			}
		}
	}

	service isa Service2 {
		name = "apache2"

		sub start {
			condition {
				this.parent.installed = true
			}
			effect {
				this.parent.running = true
			}
		}
	
		sub stop {
			condition {
				this.parent.running = true
			}
			effect {
				this.parent.running = false
			}
		}
	}
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nuri-0.5.5 modules/apache2/apache2.sfp
nuri-0.5.4 modules/apache2/apache2.sfp
nuri-0.5.3 modules/apache2/apache2.sfp