Passwork update

Linux

14min
starting from passwork 7, updates via git are no longer supported use the provided helper script for simplified installation and updates online update download the script wget wget https //repos passwork pro/repository/linux/scripts/passwork sh curl curl o https //repos passwork pro/repository/linux/scripts/passwork sh the script to update passwork should not be located in a directory along with the application server files 2\ set execution permissions chmod +x passwork sh by default, passwork sh performs create hidden script env file in current directory create directory passwork archives , for code backups in current directory downloads latest available to you passwork archive, signature, and passwork public key installs previously downloaded code to /var/www execution breakdown verify that required system tools are installed php, curl, jq, zip, unzip, file, stat, find check the php version and compare it to the required one (8 3) attempt to ping the passwork portal and check tcp connection to confirm online availability for install mode if there's an existing installation ( env file present), switch to update mode; otherwise proceed with install if the script env file exists, source it to reuse the existing api key if no api key is set, prompt the user to enter it and validate against the expected format retrieve the latest version number using the api and the provided key compare the latest version to the currently installed one, if applicable download the corresponding passwork archive using the portal key check that the downloaded file is a valid zip archive download the digital signature and public key from the server verify the signature of the zip file using openssl extract the zip archive into a temporary directory backup previous version remove previous version files, keeping configuration and logs handle the cse parameter if it's enabled check access rights for the working directory fix non root ownership if detected apply opcache settings if needed restart web server and php fpm services wait for passwork to start and run the update command to use a custom install path, disable certificate validation, or adjust behavior — see linux docid\ eznzqfzd1cha6qkmuox36 3\ run script sudo /passwork sh on first run, the script will ask for your portal api key and perform basic environment checks successfull script execution example offline update download the script use another machine with internet access wget wget https //repos passwork pro/repository/linux/scripts/passwork sh curl curl o https //repos passwork pro/repository/linux/scripts/passwork sh powershell (new object system net webclient) downloadfile("https //repos passwork pro/repository/linux/scripts/passwork sh", "$pwd\passwork sh") or download passwork sh script manually using this link https //repos passwork pro/repository/linux scripts/passwork sh the script to update passwork should not be located in a directory along with the application server files set execution permissions chmod +x passwork sh before running passwork sh download passwork 7 from customer portal (required); place it in the working directory, or use input to specify a path (required); download archive signature and passwork public key (optional if using skip ) by default, passwork sh performs create directory passwork archives , for code backups in current directory; unpack archive with passwork; installs previously unpacked code to /var/www execution breakdown ensure the script is being run as root verify that required system tools are installed php, stat, zip, unzip, file, find check the php version and compare it to the required one (8 3) attempt to ping the passwork portal and open a tcp connection; if it fails or offline is used, switch to offline mode confirm offline installation mode look for the most recent matching passwork zip archive in the input directory extract the version number from the zip file and validate that it is >= 070000 if there's an existing installation ( env file present), switch to update mode; otherwise proceed with install load existing environment variables from script env if available use the version number from the zip file as the installation version compare it with the currently installed version if applicable copy the zip archive to the temp file for installation look for the corresponding signature file and public key in the input directory copy the signature and key to temp files verify the archive’s signature using openssl extract the archive into a temporary directory backup previous version remove previous version files, keeping configuration and logs handle the cse parameter if it's enabled check access rights for the working directory fix non root ownership if detected apply opcache settings if needed restart web server and php fpm services wait for passwork to start and run the update command once prepared, run passwork sh sudo /passwork sh offline performs same environment checks successfull script execution example script parameters i , input path to archive in offline mode also defines script env , passwork archives location sudo /passwork sh i "/home/administrator/passwork" o , output target path for install (default /var/www ) sudo /passwork sh o "/var/www/passwork" offline , offline force offline mode requires linux docid\ eznzqfzd1cha6qkmuox36 sudo /passwork sh offline insecure , insecure skip certificate validation (use if server lacks ca certs) sudo /passwork sh insecure skip , skip skip archive signature check sudo /passwork sh skip