icecast2-install.py 515 B

1234567891011121314151617181920212223
  1. # -*- coding: utf-8 -*-
  2. import shutil
  3. import os
  4. import sys
  5. if os.geteuid() != 0:
  6. print "Please run this as root."
  7. sys.exit(1)
  8. def get_current_script_dir():
  9. current_script_dir = os.path.realpath(__file__)
  10. index = current_script_dir.rindex('/')
  11. return current_script_dir[0:index]
  12. try:
  13. current_script_dir = get_current_script_dir()
  14. shutil.copy(current_script_dir+"/../airtime-icecast-status.xsl", "/usr/share/icecast2/web")
  15. except Exception, e:
  16. print "exception: %s" % e
  17. sys.exit(1)