diff --git a/.github/workflows/sync2gitee.yml b/.github/workflows/sync2gitee.yml new file mode 100644 index 000000000..fdeed850a --- /dev/null +++ b/.github/workflows/sync2gitee.yml @@ -0,0 +1,34 @@ +name: sync2gitee +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + create: + branches: + - '**' + delete: + branches: + - '**' +jobs: + repo-sync: + env: + dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} + dst_token: ${{ secrets.GITEE_TOKEN }} + gitee_user: ${{ secrets.GITEE_USER }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false + - name: sync github -> gitee + uses: Yikun/hub-mirror-action@master + if: env.dst_key && env.dst_token && env.gitee_user + with: + src: 'github/${{ github.repository_owner }}' + dst: 'gitee/${{ secrets.GITEE_USER }}' + dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} + dst_token: ${{ secrets.GITEE_TOKEN }} + static_list: ${{ github.event.repository.name }} diff --git a/cyberpanel.sh b/cyberpanel.sh index ca12e6a51..427a69dca 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1112,9 +1112,16 @@ if ! grep -q "pid_max" /etc/rc.local 2>/dev/null ; then echo 1 > /sys/kernel/mm/ksm/run" >>/etc/rc.d/rc.local chmod +x /etc/rc.d/rc.local else + if [[ -f /etc/rc.local ]] ; then + echo -e "#!/bin/bash\n$(cat /etc/rc.local)" > /etc/rc.local + else + echo "#!/bin/bash" > /etc/rc.local + fi echo "echo 1000000 > /proc/sys/kernel/pid_max echo 1 > /sys/kernel/mm/ksm/run" >>/etc/rc.local chmod +x /etc/rc.local + systemctl enable rc-local >/dev/null 2>&1 + systemctl start rc-local >/dev/null 2>&1 fi if grep -q "nf_conntrack_max" /etc/sysctl.conf ; then sysctl -w net.netfilter.nf_conntrack_max=2097152 > /dev/null diff --git a/plogical/IncScheduler.py b/plogical/IncScheduler.py index c2c619f87..8076103cc 100644 --- a/plogical/IncScheduler.py +++ b/plogical/IncScheduler.py @@ -764,10 +764,23 @@ Automatic backup failed for %s on %s. if website.package.enforceDiskLimits: if config['DiskUsagePercentage'] >= 100: - command = 'chattr -R +i /home/%s' % (website.domain) + command = 'chattr -R +i /home/%s/' % (website.domain) ProcessUtilities.executioner(command) + + command = 'chattr -R -i /home/%s/logs/' % (website.domain) + ProcessUtilities.executioner(command) + + command = 'chattr -R -i /home/%s/.trash/' % (website.domain) + ProcessUtilities.executioner(command) + + command = 'chattr -R -i /home/%s/backup/' % (website.domain) + ProcessUtilities.executioner(command) + + command = 'chattr -R -i /home/%s/incbackup/' % (website.domain) + ProcessUtilities.executioner(command) + else: - command = 'chattr -R -i /home/%s' % (website.domain) + command = 'chattr -R -i /home/%s/' % (website.domain) ProcessUtilities.executioner(command) ## Calculate bw usage diff --git a/plogical/cPanelImporter.py b/plogical/cPanelImporter.py index 97f6bda5a..3283ff268 100644 --- a/plogical/cPanelImporter.py +++ b/plogical/cPanelImporter.py @@ -457,6 +457,8 @@ class cPanelImporter: zone = Domains(admin=admin, name=topLevelDomain, type="NATIVE") zone.save() except: + zone = Domains(admin=admin, name=topLevelDomain, type="NATIVE") + zone.save() pass content = "ns1." + topLevelDomain + " hostmaster." + topLevelDomain + " 1 10800 3600 604800 3600"