Skip to content

Commit 89de5f2

Browse files
committed
Fix #1776: restart was using wrong command on new AMI builds
1 parent fe32877 commit 89de5f2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

bin/upgrade

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
2-
import os
32
import argparse
3+
import os
44
import subprocess
55
import sys
66
from collections import namedtuple
@@ -111,7 +111,10 @@ def restart_services():
111111
# otherwise it won't notice that /opt/redash/current pointing at a different
112112
# directory.
113113
green("Restarting...")
114-
run('sudo /etc/init.d/redash_supervisord restart')
114+
try:
115+
run('sudo /etc/init.d/redash_supervisord restart')
116+
except subprocess.CalledProcessError as e:
117+
run('sudo service supervisor restart')
115118

116119

117120
def update_requirements(version_name):

0 commit comments

Comments
 (0)