-refactored pypo install and uninstall scripts into start/stop/install/uninstall scripts

This commit is contained in:
mkonecny 2010-12-17 14:15:53 -05:00
parent f37d977356
commit 1c16f6f9e7
4 changed files with 54 additions and 12 deletions

22
pypo/install/pypo-stop.py Normal file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
if os.geteuid() != 0:
print "Please run this as root."
sys.exit(1)
try:
print "Stopping daemontool script pypo-fetch"
os.system("svc -dx /etc/service/pypo-fetch")
print "Stopping daemontool script pypo-push"
os.system("svc -dx /etc/service/pypo-push")
print "Stopping daemontool script pypo-liquidsoap"
os.system("svc -dx /etc/service/pypo-liquidsoap")
except Exception, e:
print "exception:" + str(e)