Files
CyberPanel/plogical/test.py
2020-04-09 22:53:57 +05:00

9 lines
303 B
Python
Executable File

import os
import subprocess
rootdir = '/home/repo.cyberpanel.net/public_html/epel/Packages'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
if file.endswith('.rpm'):
command = 'rpm --resign %s/%s' % (subdir, file)
subprocess.call(command, shell=True)