def setup_init_scripts(self):
        if self.os_type in ['centos', 'redhat', 'fedora'] and self.os_initdaemon == 'systemd':
                script_name = os.path.split(self.tomcat_template_centos7)[-1]
                dest_folder = os.path.dirname(self.tomcat_service_centos7)
                try:
                    self.copyFile(self.tomcat_template_centos7, dest_folder)
                    self.run(["chmod", "755", self.tomcat_service_centos7])
                    self.run([self.tomcat_service_centos7, "install"])
                except:
                    self.logIt((self.tomcat_template_centos7, dest_folder) % "Error copying script file %s to %s")
                    self.logIt(traceback.format_exc(), True)
        else:
            for init_file in self.init_files:
                try:
                    script_name = os.path.split(init_file)[-1]
                    self.copyFile(init_file, "/etc/init.d")
                    self.run(["chmod", "755", "/etc/init.d/%s" % script_name])
                except:
                    self.logIt("Error copying script file %s to /etc/init.d" % init_file)
                    self.logIt(traceback.format_exc(), True)

        if self.os_type in ['centos', 'redhat', 'fedora']:
            for service in self.redhat_services:
                self.run(["/sbin/chkconfig", service, "on"])
        elif self.os_type in ['ubuntu', 'debian']:
            self.run(["/usr/sbin/update-rc.d", 'tomcat', 'start', '50', '3', "."])
            for service in self.debian_services:
                self.run(["/usr/sbin/update-rc.d", service, 'enable'])
dataset/ETHPy150Open GluuFederation/community-edition-setup/setup.py/Setup.setup_init_scripts/swapped operands of `%`