Files
CyberPanel/plogical/test.py

9 lines
303 B
Python
Raw Normal View History

2020-04-09 22:53:57 +05:00
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)