Exemplo n.º 1
0
	def createAsteriskConfig(self):
		pass
		if int(self.level) == 3:
			c = AstConf("smb.conf")
			c.setSection("%s-mohmp3" % self.name)
			c.append("path = /usr/share/asterisk/mohmp3/")
			c.append("valid users = %s" % self.name)
			c.append("force user = root")
                        c.append("read only = no")
		
			c.setSection("%s-monitor" % self.name)
			c.append("path = /var/spool/asterisk/monitor/")
			c.append("valid users = %s" % self.name)
			c.append("force user = root")
                        c.append("read only = no")

			c.setSection("%s-respaldo" % self.name)
			c.append("path = /var/respaldo/")
			c.append("valid users = %s" % self.name)
			c.append("force user = root")
                        c.append("read only = no")

			c.setSection("%s-ivr" % self.name)
			c.append("path = /usr/share/asterisk/sounds/ivr/")
			c.append("valid users = %s" % self.name)
			c.append("force user = root")
                        c.append("read only = no")

			sambautils.setPassword(self.name, self.secret)
			sambautils.restartDaemon()
Exemplo n.º 2
0
	def createAsteriskConfig(self):
		pass
		if int(self.level) == 3 and config.SAMBA_ENABLED:
			c = AstConf("smb.conf")
			c.setSection("%s-spool" % self.name)
			c.append("path = /var/spool/asterisk/")
			c.append("valid users = %s" % self.name)
			c.append("force user = root")
                        c.append("read only = no")

			c.setSection("%s-share" % self.name)
			c.append("path = /usr/share/asterisk/")
			c.append("valid users = %s" % self.name)
			c.append("force user = root")
                        c.append("read only = no")

			sambautils.setPassword(self.name, self.secret)
			sambautils.restartDaemon()