def _yenile(self): apache = Apache(self.domain) apache.yenile() system('chmod 755 /var/www/phpmyadmin/public_html/config.inc.php') system('service nscd restart') exit()
def _sil(self): self._uzanti() hosts = Hosts(self.domain) hosts.sil() apache = Apache(self.domain) apache.sil() self.platform.sil() mysql = MySQL(self.kullanici) mysql.yoket()
def _ekle(self): self._kullanici_varmi_kontrol() self._uzanti() self._sifre() self._hata_ayiklama() hosts = Hosts(self.domain) hosts.ekle() self.platform.yarat(self.domain, self.sifre, self.hata_ayiklama) apache = Apache(self.domain) apache.ekle(self.platform.apache, self.kullanici) mysql = MySQL(self.kullanici) mysql.yarat(self.sifre) system('chmod -R 777 /var/www/' + self.kullanici) system('chown -R ' + VARSAYILAN_KULLANICI + ':www-data /var/www/' + self.kullanici)
def _kur(self): self.kullanici = 'phpmyadmin' if path.isdir('/var/www/' + self.kullanici): system('rm -Rf /var/www/phpmyadmin') self.domain = self.kullanici + '.' + self.uzanti hosts = Hosts(self.domain) hosts.ekle() mysql = MySQL(self.kullanici) mysql.yarat(ROOT_SIFRE) platform = PHPMyAdmin() platform.kur() apache = Apache(self.domain) apache.ekle(platform.apache, self.kullanici) system('chmod -R 777 /var/www/' + self.kullanici) system('chown -R ' + VARSAYILAN_KULLANICI + ':www-data /var/www/' + self.kullanici) self._yenile()
def _aktif(self): self._uzanti() apache = Apache(self.domain) apache.aktif()
def _pasif(self): self._uzanti() apache = Apache(self.domain) apache.pasif()