Skip to content

Commit

Permalink
putting back csf, ref #1328
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Oct 2, 2024
1 parent f0a9bee commit d5c2e46
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions plogical/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -3543,9 +3543,23 @@ def upgrade(branch):
except:
pass

#command = 'csf -uf'
command = '/etc/csf/uninstall.sh'
command = 'csf -uf'
Upgrade.executioner(command, 'fix csf if there', 0)

sed_commands = [
'sed -i "s/url(r\'^configservercsf/path(\'configservercsf/g" /usr/local/CyberCP/CyberCP/urls.py',
'sed -i "s/from django.conf.urls import url/from django.urls import path/g" /usr/local/CyberCP/configservercsf/urls.py',
'sed -i "s/import signals/import configservercsf.signals/g" /usr/local/CyberCP/configservercsf/apps.py',
'sed -i "s/url(r\'^$\'/path(\'\'/g" /usr/local/CyberCP/configservercsf/urls.py',
'sed -i "s|url(r\'^iframe/$\'|path(\'iframe/\'|g" /usr/local/CyberCP/configservercsf/urls.py',
'killall lswsgi'
]

for cmd in sed_commands:
Upgrade.executioner(command, 'fix csf if there', 0)



command = 'systemctl stop cpssh'
Upgrade.executioner(command, 'fix csf if there', 0)
Upgrade.AutoUpgradeAcme()
Expand Down

0 comments on commit d5c2e46

Please sign in to comment.