Class: Serverspec::Commands::Solaris
- Inherits:
-
Base
- Object
- Base
- Serverspec::Commands::Solaris
show all
- Defined in:
- lib/serverspec/commands/solaris.rb
Instance Method Summary
collapse
Methods inherited from Base
#check_cron_entry, #check_directory, #check_file, #check_file_contain, #check_group, #check_grouped, #check_link, #check_mode, #check_owner, #check_process, #check_user
Instance Method Details
#check_enabled(service) ⇒ Object
4
5
6
|
# File 'lib/serverspec/commands/solaris.rb', line 4
def check_enabled service
"svcs -l #{service} 2> /dev/null | grep 'enabled true'"
end
|
#check_installed(package) ⇒ Object
8
9
10
|
# File 'lib/serverspec/commands/solaris.rb', line 8
def check_installed package
"pkg list -H #{package} 2> /dev/null"
end
|
#check_listening(port) ⇒ Object
12
13
14
|
# File 'lib/serverspec/commands/solaris.rb', line 12
def check_listening port
"netstat -an 2> /dev/null | egrep 'LISTEN|Idle' | grep '\.#{port} '"
end
|
#check_running(service) ⇒ Object
16
17
18
|
# File 'lib/serverspec/commands/solaris.rb', line 16
def check_running service
"svcs -l #{service} status 2> /dev/null |grep 'state online'"
end
|