Добавлена иконка для папки FTP сервера

git-svn-id: http://svn.calculate.ru/calculate2/calculate-server/trunk@659 c91db197-33c1-4113-bf15-f8a5c547ca64
develop
asamoukin 16 years ago
parent 19195f808a
commit 5c0848c9c5

@ -6544,15 +6544,30 @@ class servFtp(shareLdap):
# Устанавливаем автозапуск демона
if not self.setDaemonAutostart("proftpd"):
return False
# Устанавливаем переменную для клиента
fullHostName = "%s.%s"%(self.clVars.Get('os_net_hostname'),
self.clVars.Get('os_net_domain'))
self.clVars.Set("cl_remote_ftp",fullHostName,True)
#cоздаем рабочую ftp директорию
ftpPath = self.clVars.Get("sr_ftp_path")
if not os.path.exists(ftpPath):
os.makedirs(ftpPath)
# Создадим иконку для share
fileTxt = "[Desktop Entry]\nIcon=folder-downloads"
fileDirectory = os.path.join(ftpPath,".directory")
uid = 0
gid = 0
if not self.createUserFile(fileDirectory, fileTxt, uid, gid):
return False
#cоздаем директорию tmp
ftpTmpPath = os.path.join(ftpPath,"tmp")
if not os.path.exists(ftpTmpPath):
os.makedirs(ftpTmpPath)
os.chmod(ftpTmpPath,0777)
#запишем переменные для клиента
clientVars = ["cl_remote_ftp"]
if not self.saveVarsClient(clientVars):
return False
self.clVars.Write("sr_ftp_set","on")
self.printOK(_("FTP service configured") + " ...")
return True

@ -348,6 +348,9 @@ class Data:
#-----------------------------------------------------
#Сервис FTP
#-----------------------------------------------------
# имя компьютера с настроенным сервисом FTP
cl_remote_ftp = {}
#DN админстратора сервиса FTP (он, же DN сервиса)
#V soft_ldap_admin_ftp
ld_ftp_dn = {}

Loading…
Cancel
Save