Skip to content

Commit

Permalink
Automated conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitry-ishenko committed Dec 15, 2024
1 parent aac5996 commit dce0439
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions tools/json/config.software.json
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
],
"status": "Stable",
"author": "@igorpecovnik",
"condition": "systemctl is-active --quiet service display-manager"
"condition": "srv_active display-manager"
}
]
},
Expand Down Expand Up @@ -348,7 +348,7 @@
"command": [
"get_user_continue \"This operation will purge avahi-daemon \nDo you wish to continue?\" process_input",
"check_if_installed avahi-daemon",
"systemctl stop avahi-daemon avahi-daemon.socket",
"srv_stop avahi-daemon avahi-daemon.socket",
"debconf-apt-progress -- apt-get -y purge avahi-daemon"
],
"status": "Stable",
Expand Down Expand Up @@ -1161,22 +1161,22 @@
"id": "MAN003",
"description": "Start Cockpit Service",
"command": [
"sudo systemctl enable --now cockpit.socket | show_infobox "
"srv_enable --now cockpit.socket | show_infobox "
],
"status": "Stable",
"author": "@schwar3kat",
"condition": "check_if_installed cockpit && ! systemctl is-enabled cockpit.socket > /dev/null 2>&1"
"condition": "check_if_installed cockpit && ! srv_enabled cockpit.socket > /dev/null 2>&1"
},
{
"id": "MAN004",
"description": "Stop Cockpit Service",
"command": [
"systemctl stop cockpit cockpit.socket",
"systemctl disable cockpit.socket | show_infobox "
"srv_stop cockpit cockpit.socket",
"srv_disable cockpit.socket | show_infobox "
],
"status": "Stable",
"author": "@schwar3kat",
"condition": "check_if_installed cockpit && systemctl is-enabled cockpit.socket > /dev/null 2>&1"
"condition": "check_if_installed cockpit && srv_enabled cockpit.socket > /dev/null 2>&1"
},
{
"id": "MAN005",
Expand Down
20 changes: 10 additions & 10 deletions tools/json/config.system.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
"description": "Disable root login",
"command": [
"sed -i \"s|^#\\?PermitRootLogin.*|PermitRootLogin no|\" /etc/ssh/sshd_config",
"systemctl restart sshd.service 2>/dev/null | systemctl restart ssh.service 2>/dev/null"
"srv_restart sshd.service 2>/dev/null | srv_restart ssh.service 2>/dev/null"
],
"status": "Stable",
"author": "@igorpecovnik",
Expand All @@ -180,7 +180,7 @@
"description": "Enable root login",
"command": [
"sed -i \"s/^#\\?PermitRootLogin.*/PermitRootLogin yes/\" /etc/ssh/sshd_config",
"systemctl restart sshd.service 2>/dev/null | systemctl restart ssh.service 2>/dev/null"
"srv_restart sshd.service 2>/dev/null | srv_restart ssh.service 2>/dev/null"
],
"status": "Stable",
"author": "@igorpecovnik",
Expand All @@ -191,7 +191,7 @@
"description": "Disable password login",
"command": [
"sed -i \"s/^#\\?PasswordAuthentication.*/PasswordAuthentication no/\" /etc/ssh/sshd_config",
"systemctl restart sshd.service 2>/dev/null | systemctl restart ssh.service 2>/dev/null"
"srv_restart sshd.service 2>/dev/null | srv_restart ssh.service 2>/dev/null"
],
"status": "Stable",
"author": "@igorpecovnik",
Expand All @@ -202,7 +202,7 @@
"description": "Enable password login",
"command": [
"sed -i \"s/^#\\?PasswordAuthentication.*/PasswordAuthentication yes/\" /etc/ssh/sshd_config",
"systemctl restart sshd.service 2>/dev/null | systemctl restart ssh.service 2>/dev/null"
"srv_restart sshd.service 2>/dev/null | srv_restart ssh.service 2>/dev/null"
],
"status": "Stable",
"author": "@igorpecovnik",
Expand All @@ -213,7 +213,7 @@
"description": "Disable Public key authentication login",
"command": [
"sed -i \"s/^#\\?PubkeyAuthentication.*/PubkeyAuthentication no/\" /etc/ssh/sshd_config",
"systemctl restart sshd.service 2>/dev/null | systemctl restart ssh.service 2>/dev/null"
"srv_restart sshd.service 2>/dev/null | srv_restart ssh.service 2>/dev/null"
],
"status": "Stable",
"author": "@igorpecovnik",
Expand All @@ -224,7 +224,7 @@
"description": "Enable Public key authentication login",
"command": [
"sed -i \"s/^#\\?PubkeyAuthentication.*/PubkeyAuthentication yes/\" /etc/ssh/sshd_config",
"systemctl restart sshd.service 2>/dev/null | systemctl restart ssh.service 2>/dev/null"
"srv_restart sshd.service 2>/dev/null | srv_restart ssh.service 2>/dev/null"
],
"status": "Stable",
"author": "@igorpecovnik",
Expand All @@ -238,7 +238,7 @@
"! check_if_installed libpam-google-authenticator && ! check_if_installed qrencode || debconf-apt-progress -- apt-get -y purge libpam-google-authenticator qrencode",
"sed -i \"s/^#\\?ChallengeResponseAuthentication.*/ChallengeResponseAuthentication no/\" /etc/ssh/sshd_config || sed -i \"0,/KbdInteractiveAuthentication/s//ChallengeResponseAuthentication yes/\" /etc/ssh/sshd_config",
"sed -i '/^auth required pam_google_authenticator.so nullok/ d' /etc/pam.d/sshd",
"systemctl restart sshd.service 2>/dev/null | systemctl restart ssh.service 2>/dev/null"
"srv_restart sshd.service 2>/dev/null | srv_restart ssh.service 2>/dev/null"
],
"status": "Stable",
"author": "@igorpecovnik",
Expand All @@ -253,7 +253,7 @@
"sed -i \"s/^#\\?ChallengeResponseAuthentication.*/ChallengeResponseAuthentication yes/\" /etc/ssh/sshd_config",
"sed -i $'/KbdInteractiveAuthentication/{iChallengeResponseAuthentication yes\\n:a;n;ba}' /etc/ssh/sshd_config || sed -n -i '/password updating/{p;:a;N;/@include common-password/!ba;s/.*\\n/auth required pam_google_authenticator.so nullok\\nauth required pam_permit.so\\n/};p' /etc/pam.d/sshd",
"[ ! -f /root/.google_authenticator ] && qr_code generate",
"systemctl restart sshd.service 2>/dev/null | systemctl restart ssh.service 2>/dev/null"
"srv_restart sshd.service 2>/dev/null | srv_restart ssh.service 2>/dev/null"
],
"status": "Stable",
"author": "@igorpecovnik",
Expand Down Expand Up @@ -284,7 +284,7 @@
"description": "Disable last login banner",
"command": [
"sed -i \"s/^#\\?PrintLastLog.*/PrintLastLog no/\" /etc/ssh/sshd_config",
"systemctl restart ssh.service "
"srv_restart ssh.service "
],
"status": "Stable",
"author": "@igorpecovnik",
Expand All @@ -295,7 +295,7 @@
"description": "Enable last login banner",
"command": [
"sed -i \"s/^#\\?PrintLastLog.*/PrintLastLog yes/\" /etc/ssh/sshd_config",
"systemctl restart ssh.service "
"srv_restart ssh.service "
],
"status": "Stable",
"author": "@igorpecovnik",
Expand Down

0 comments on commit dce0439

Please sign in to comment.