start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
start [2025/08/11 05:05] ZAKS Webstart [2025/08/11 08:22] (current) ZAKS Web
Line 1: Line 1:
 ====== ZAKS Web API Documentation ====== ====== ZAKS Web API Documentation ======
  
 +<code bash>
 +#!/bin/bash
 +
 +if [[ -z ${1} ]]; then
 +  echo "Give an extension name..."
 +  exit 1
 +fi
 +
 +declare -a errors
 +
 +versions=($(ls -1 /etc/php))
 +while [[ $# -gt 0 ]]; do
 +  for version in ${versions[@]}; do
 +    echo -n "Installing php${version}-${1}..."
 +    apt -y install php${version}-${1} > /dev/null 2>&1
 +    if [[ $? == 0 ]]; then
 +      echo "INSTALLED!"
 +    else
 +      echo "FAILED!"
 +      errors+=("php${version}-${1}")
 +    fi
 +  done
 +  shift
 +done
 +
 +echo
 +echo
 +echo
 +if [[ ${#errors[@]} -gt 0 ]]; then
 +  echo "The following extensions failed to install:"
 +  echo ${errors[@]} | tr ' ' '\n'
 +  exit 1
 +else
 +  echo "Everything installed without a hitch!"
 +fi
 +</code>
 +
 +<code json>
 +{
 +  "status": 200,
 +  "result": "ok",
 +  "data": {
 +    "this_key": "This value!",
 +    "that_key": true,
 +    "the_other_key": 3.14
 +  },
 +  "array": [
 +    "one",
 +    "two",
 +    "three"
 +  ]
 +}
 +</code>
  • start.1754888752.txt.gz
  • Last modified: 2025/08/11 05:05
  • by ZAKS Web