Download the PHP package grossberger-georg/run-script without Composer

On this page you can find all versions of the php package grossberger-georg/run-script. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package run-script

Run Script

This is a TYPO3 extension that allows an editor to run configured server-side scripts via a backend interface. It will add a dropdown menu to the toolbar of the backend to select the script to run.

Installation

Use composer to add the extension as a dependency: composer require grossberger-georg/run-script.

Configuration

Important: The webserver must have nohup and bash installed and available to the user running in the PHP process in its $PATH variable.

Creating a script

The executing script will change its working directory to the root path of the project and export all available environment variables before execution. Example: in a composer-mode installation with default options, the script ./vendor/bin/typo3 scheduler:run would start the scheduler.

The script is not escaped, quoted or in any other way changed. It is executed as it is given.

Any valid bash command is a valid script, so this is allowed too: if [[ ! -f /tmp/hello ]]; then echo Hello > /tmp/hello; sleep 200; rm /tmp/hello; fi

If the scripts points to a file, make sure it has the executable bit set.

If it is a file and has an EXT: prefix it will be resolved to an absolute path. An EXT: prefix somewhere in between will not be resolved. The script EXT:shop/Resources/Private/Scripts/import.sh will work, but if [[ ! -f /tmp/importing ]]; then EXT:shop/Resources/Private/Scripts/import.sh; fi; will not.

Only one instance of a script can run at a time. EXT:run_script will create a lock and inform a user if there is already a process running that script.

Setup scripts to run

A script is two parts: a key as well as an array with at least two entries: a name and the bash command to execute. They are added to the global TYPO3_CONF_VARS:

Use an extensions ext_localconf.php or the AdditionalConfiguration.php file to add scripts. A simple demo is included which can be activated with in the extension settings with the option Enable demo scripts

The key should follow the TYPO3 convention of tx_myext_function.

Inside the array, the following options are available:

Option Required Description
label yes Label of the script, can be a LLL: reference
script yes The script to execute
icon no Icon identifier shown in the dropdown
reloadBackend no Reload the backend after the given seconds

If reloadBackend is given, the number is the count of seconds, after which the backend is reloaded, after a script finished. This is useful if a script changes the data visible in the backend, like a product importer.

Permissions

By default, administrators see all scripts. This can be disabled in the extension settings with the option Disable always access for administators. Then the access must be granted with TSConfig settings, like to editors.

Editors can only execute scripts which are in a comma separated list in the TSConfig key tx_runscript.allowed. The key of the configuration array must be in this list for a script to be executable.

Example:

License

MIT License, see https://opensource.org/licenses/MIT

Logo and icon from Bootstrap Icons, released under the MIT license.

TYPO3 is released under the GNU/GPL License. Please see https://github.com/TYPO3/TYPO3.CMS/blob/master/LICENSE.txt for details


All versions of run-script with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
typo3/cms-backend Version ^12.4
typo3/cms-core Version ^12.4
typo3/cms-extbase Version ^12.4
typo3/cms-fluid Version ^12.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package grossberger-georg/run-script contains the following files

Loading the files please wait ....