]> git.parisson.com Git - telecaster-server.git/commitdiff
partially update install
authorGuillaume Pellerin <guillaume.pellerin@free.fr>
Wed, 31 Jan 2024 18:11:23 +0000 (19:11 +0100)
committerGuillaume Pellerin <guillaume.pellerin@free.fr>
Wed, 31 Jan 2024 18:11:23 +0000 (19:11 +0100)
debian-requirements.txt
install.py

index 8f17a19c6d2876579e1808cc4fa4ef2d364e5f63..d6bf0f781f5bad72d4608d0ae9eed4d48938a5df 100644 (file)
@@ -1 +1,3 @@
-libmariadb-dev libcurl4-gnutls-dev liblo-dev cython python-pip libshout-dev
+python python-dev python-libxml2 python-pip python-setuptools python-twitter python-liblo python-mutagen icecast2 nginx uwsgi jackd2 vorbis-tools procps meterbridge fluxbox vnc4server xtightvncviewer swh-plugins libshout3 libshout3-dev libmad0-dev libogg-dev g++ python-yaml swatch libmariadb-dev libcurl4-gnutls-dev liblo-dev cython pulseaudio v4l2loopback-dkms v4l2loopback-utils
+
+
index 008c44cd9bd3db602499a0a4232f74b4e21f49b0..59844f5b922e1003d2bfbce05b09f79231574bae 100644 (file)
@@ -65,10 +65,7 @@ class Install(object):
         self.m3u_dir = '/var/www/m3u'
         self.log_dir = '/var/log/telecaster'
         self.conf_dir = '/etc/telecaster'
-        self.stream_m_conf_dir = '/etc/stream-m'
-        self.init_dirs = ['/etc/init.d/', '/etc/default/']
-        self.daemons = ['jackd', 'telecaster', 'stream-m']
-        #self.apache_conf = '/etc/apache2/sites-available/telecaster.conf'
+
 
     def create_user(self):
         if not os.path.exists(self.home):
@@ -80,48 +77,30 @@ class Install(object):
         os.system('chown -R ' + self.user + ':' + self.user + ' ' + dir)
 
     def install_deps(self):
-        os.system("""sudo aptitude install python python-dev python-xml python-libxml2 python-pip \
-                    python-setuptools python-twitter python-liblo python-mutagen \
-                    icecast2 nginx uwsgi jackd libjack-dev vorbis-tools procps meterbridge fluxbox \
-                    vnc4server vncviewer swh-plugins jack-rack libshout3 libshout3-dev libmad0-dev libogg-dev \
-                     g++ python-yaml swatch""")
+        package_list = open("debian-requirements.txt", "r").read()
+        os.system("apt install " + package_list)
 
         # Install DeeFuzzer
         os.system("pip install deefuzzer")
 
-        # Install Stream-m
-        os.chdir(self.app_dir)
-        os.system('cp -ra lib/stream-m /usr/local/lib/')
-        init_link = '/usr/local/bin/stream-m'
-        if not os.path.islink(init_link):
-            os.system('ln -s /usr/local/lib/stream-m/bin/stream-m '+init_link)
-
     def install_conf(self):
         os.chdir(self.app_dir)
 
-        for conf_dir in [self.conf_dir, self.stream_m_conf_dir]:
-            in_files = os.listdir('src'+conf_dir)
-            os.system('cp -ra src'+ conf_dir + '/*' + ' ' + conf_dir)
+        os.system('cp -ra ' + conf_dir + '/*' + ' ' + conf_dir)
             self.chown(conf_dir)
 
-        for dir in os.listdir('src/home'):
+        for dir in os.listdir('env'):
             home_dir = self.home + dir
             if not os.path.exists(home_dir):
                 os.makedirs(home_dir)
             os.system('cp -r src/home/'+dir + '/* ' + home_dir)
             self.chown(home_dir)
 
-        #shutil.copy('src'+self.apache_conf, self.apache_conf)
-        os.system('a2ensite telecaster.conf')
-        #os.system('/etc/init.d/apache2 reload')
-
-        dir = '/etc/pm/'
-        os.system('cp -r src' + dir + '* ' + dir)
 
     def install_init(self):
         os.chdir(self.app_dir)
 
-        dirs = [self.rss_dir, self.m3u_dir, self.log_dir, self.conf_dir,  self.stream_m_conf_dir]
+        dirs = [self.rss_dir, self.m3u_dir, self.log_dir, self.conf_dir]
         for dir in dirs:
             if not os.path.exists(dir):
                 os.makedirs(dir)
@@ -133,16 +112,10 @@ class Install(object):
                 shutil.copy('src'+path, path)
                 os.system('sudo chmod 755 '+path)
 
-        os.system('cp -ra src/usr/* /usr/')
-        os.system('cp -ra src/etc/init.d/* /etc/init.d/')
+        os.system('cp -ra etc/init.d/* /etc/init.d/')
 
-        os.system('sudo update-rc.d -f jackd remove')
-        os.system('sudo update-rc.d -f stream-m remove')
-        os.system('sudo update-rc.d -f vncserver remove')
         os.system('sudo update-rc.d -f telecaster remove')
 
-        os.system('update-rc.d jackd defaults 30 30')
-        os.system('update-rc.d stream-m defaults 20 20')
         os.system('update-rc.d telecaster defaults 99 15')
 
         os.system('chmod 777 ' + self.m3u_dir)