Skip to content

Instantly share code, notes, and snippets.

View w3servicesdotnet's full-sized avatar

W3SERVICES w3servicesdotnet

View GitHub Profile
@w3servicesdotnet
w3servicesdotnet / readme.md
Created March 18, 2023 15:02 — forked from Trogvars/readme.md
Centos 7 upgrade to 8, Migrate to Stream or Rocky Linux.

Doing upgrade of Centos 7 server to Centos 8. Step to step guide.

1. Migrating backup of working system to virtual guest or another server.

Preparation of test image. Boot from Centos 7 CD into troubleshoot mode and skip to shell. Prepare disks of guest machine. Make partitions and filesystems.

Sda2 - boot - ext2

@w3servicesdotnet
w3servicesdotnet / IPtables and csf.md
Created June 24, 2021 09:32 — forked from macmladen/IPtables and csf.md
Handling firewall blocking and unblocking, iptables, csf
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@w3servicesdotnet
w3servicesdotnet / haproxy.config
Created April 28, 2021 10:45 — forked from hzbd/haproxy.config
Sample HAProxy config with logging.
global
pidfile /var/run/haproxy.pid
log 127.0.0.1 local0 info
ulimit-n 65536
defaults
mode http
clitimeout 600000 # maximum inactivity time on the client side
srvtimeout 600000 # maximum inactivity time on the server side
@w3servicesdotnet
w3servicesdotnet / manage-etc-hosts.sh
Created April 27, 2021 12:29 — forked from alrik11es/manage-etc-hosts.sh
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/usr/bin/env bash
set -eu
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# PATH TO YOUR HOSTS FILE
@w3servicesdotnet
w3servicesdotnet / install-duplicati-on-centos6.sh
Created September 16, 2019 12:32 — forked from gene1wood/install-duplicati-on-centos6.sh
How to install Duplicati on CentOS 6
# Install mono
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
yum-config-manager --add-repo http://download.mono-project.com/repo/centos6/
yum install mono-complete
# Install duplicati, ignoring dependencies
wget https://updates.duplicati.com/beta/duplicati-2.0.2.1-2.0.2.1_beta_20170801.noarch.rpm
rpm -ivh --nodeps duplicati-2.0.2.1-2.0.2.1_beta_20170801.noarch.rpm
# Create init script and enable the service

Copy/ Move CyberPanel Backup Archive(s) using Bash Script with/ without Crontab/ Systemd Timer

These scripts will copy/ move CyberPanel backup archive(s) from /home/domain/backup directory to a specified directory by the user.

How to Use it?

  1. There are two scripts to work with. One is cpbac_a.sh another one is cpbac_m.sh. If you want to use it with crontab/ systemd timer then cpbac_a.sh is suitable for you. If you want to use it manually with prompt (running it by yourself) then cpbac_m.sh is suitable for you.

  2. If you want to use cpbac_a.sh then put the cpbac_a.sh file to anyhwere you like. E.g., /home/scripts.

  • Open terminal.
  • Give the file execute permission, type/ copy sudo chmod +x /location/cpbac_a.sh press Enter.
  • For executing the script, type/ copy /location/cpbac_a.sh press Enter.