Path: blob/master/contrib/vm/compute_node/root/check_sagecell
810 views
#!/bin/sh
systemctl --quiet is-active sagecell
if [ $? -ne 0 ]
then
echo "`date` Service is not active, skipping check"
exit 0
fi
/home/{server}/sagecell/contrib/sagecell-client/sagecell-service.py $1
if [ $? -ne 0 ]
then
echo "`date` Error in server. Restarting..."
systemctl restart sagecell
echo "`date` Restarted."
echo "************"
exit 1
fi