Skip to content

Commit

Permalink
Merge pull request #431 from obino/service
Browse files Browse the repository at this point in the history
Don't override an init.d script.
  • Loading branch information
nlake44 committed Apr 9, 2015
2 parents e6d4bc0 + b75f445 commit 56f3f29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions lib/remote_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,16 +686,7 @@ def start_remote_appcontroller(cls, host, keyname, is_verbose):
cls.ssh(host, keyname, 'service monit start', is_verbose)
time.sleep(1)

# Make the controller a service.
cls.ssh(host, keyname, 'cp {0} {1}'.format(
'/root/appscale/AppController/scripts/appcontroller',
'/etc/init.d/'), is_verbose)

# Init.d requires the script to be executable.
cls.ssh(host, keyname, 'chmod +x {0}'.format(
'/etc/init.d/appcontroller'), is_verbose)

# Finally, start the AppController.
# Start the AppController.
cls.ssh(host, keyname, 'monit start -g controller', is_verbose)
time.sleep(1)

Expand Down
4 changes: 2 additions & 2 deletions templates/appcontroller.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
check process controller-17443 matching "/usr/bin/ruby -w /root/appscale/AppController/djinnServer.rb"
group controller
start program = "/usr/sbin/service appcontroller start"
stop program = "/usr/sbin/service appcontroller stop"
start program = "/usr/sbin/service appscale-controller start"
stop program = "/usr/sbin/service appscale-controller stop"
if memory is greater than 250 MB for 5 cycles then restart

0 comments on commit 56f3f29

Please sign in to comment.