Kinda finished
This commit is contained in:
parent
3141840cf4
commit
2275037039
2 changed files with 30 additions and 4 deletions
|
@ -1,3 +1,23 @@
|
|||
if grep -q "^__your_type/object/id:conf_file_changed" "$__messages_in"; then
|
||||
echo "service nginx reload"
|
||||
fi
|
||||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
#if grep -q "$something_from_message_in" "$__messages_in"; then
|
||||
|
||||
case "${os}" in
|
||||
alpine|gentoo)
|
||||
echo /etc/init.d/nginx reload
|
||||
;;
|
||||
debian|ubuntu)
|
||||
echo "/usr/bin/systemctl reload nginx"
|
||||
;;
|
||||
esac
|
||||
|
||||
#fi
|
||||
|
||||
|
||||
#if grep -q "^__your_type/object/id:conf_file_changed" "$__messages_in"; then
|
||||
# echo "$reload_command"
|
||||
#fi
|
||||
|
||||
# Testing env -> variables are not shared between the type's manifest and the gencode-remote script
|
||||
# Maybe the variables are eval-ed on the local host and won't get transferred to the remote host?
|
||||
#echo "echo \"$reload_command\" >> /tmp/cmd"
|
|
@ -1,3 +1,8 @@
|
|||
os="$(cat "$__global/explorer/os")"
|
||||
|
||||
# Note: __service nginx --action reload
|
||||
|
||||
|
||||
domain="$__object_id"
|
||||
nginx_config_dir="/etc/nginx/conf.d"
|
||||
|
||||
|
@ -15,4 +20,5 @@ server {
|
|||
}
|
||||
EOF
|
||||
|
||||
echo "conf_file_changed" >> "$__messages_out"
|
||||
# Messaging is not needed because atm I assume that the config file will get overwritten every run, even if the contents are the same.
|
||||
#echo "conf_file_changed" >> "$__messages_out"
|
Loading…
Reference in a new issue