scripts/postgresql.rb in standup-0.3.34 vs scripts/postgresql.rb in standup-0.3.35

- old
+ new

@@ -14,12 +14,17 @@ upload script_file('postgresql.conf'), :to => '/etc/postgresql/9.0/main/postgresql.conf', :sudo => true tune_kernel - - sudo 'service postgresql restart' + + with_processed_file script_file('postgresql_monit.conf') do |file| + scripts.monit.add_watch file + end + + restart +# sudo 'service postgresql restart' end def exec_sql sql, local = false command = "psql -c \"#{sql}\" -U postgres -w" if local @@ -42,9 +47,13 @@ "pg_dump -c #{database} -U #{username} -w" end def load_command database, username = 'postgres', *args "psql #{database} -U #{username} -w" + end + + def restart + scripts.monit.restart_watch 'postgresql' end protected def tune_kernel