forked from Spark/ssm-services
11
services/hostname
Normal file
11
services/hostname
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env ssm
|
||||
|
||||
# Get hostname from /etc/hostname
|
||||
if [[ -e "/etc/hostname" ]]; then
|
||||
cfg_hostname="$(</etc/hostname)"
|
||||
fi
|
||||
|
||||
[[ "$cfg_hostname" ]] || { cfg_hostname='localhost'; }
|
||||
|
||||
service_type='oneshot'
|
||||
service_command=( /usr/bin/hostname "$cfg_hostname" )
|
Reference in New Issue
Block a user