Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/smc_pyutil/smc_pyutil/restart_smc.py
Views: 285
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
# This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
5
# License: AGPLv3 s.t. "Commons Clause" – read LICENSE.md for details
6
7
from __future__ import absolute_import
8
from __future__ import print_function
9
import os
10
import sys
11
12
13
def cmd(s):
14
print(s)
15
if os.system(s):
16
sys.exit(1)
17
18
19
cmd("smc-stop")
20
cmd("smc-start")
21
22