Collection of scripts used with wapt server
These scripts are compatible with WAPT 1.5-1.8 and should be ran using the waptpython executable.
Exemples below assume default installation in /opt/wapt
:
cd /opt/wapt && git clone https://github.com/jf-guillou/wapt-scripts.git
Optional bash aliases:
echo "alias wapt-addpackage='PYTHONHOME=/opt/wapt PYTHONPATH=/opt/wapt WAPT_CERT=/opt/wapt/wapt-scripts/certs/wapt.crt WAPT_KEY=/opt/wapt/wapt-scripts/certs/key.pem WAPT_PASSWD=key_password /opt/wapt/bin/python /opt/wapt/wapt-scripts/wapt-addpackage.py'" >> ~/.bash_aliases
echo "alias wapt-sync='PYTHONHOME=/opt/wapt PYTHONPATH=/opt/wapt WAPT_CERT=/opt/wapt/wapt-scripts/certs/wapt.crt WAPT_KEY=/opt/wapt/wapt-scripts/certs/key.pem WAPT_PASSWD=key_password /opt/wapt/bin/python /opt/wapt/wapt-scripts/wapt-sync.py'" >> ~/.bash_aliases
Various environments variables are available :
Optional, points to wapt Packages location, defaults to /var/www/wapt
Optional, points to certificate file used to re-sign imported packages
Optional, points to certificate key file used to re-sign imported packages
Optional, password used to decrypt WAPT_KEY certificate key
Search in known repositories (TIS/SMP) for packages, pick best match and copy it in local repository.
Differs from Import function by keeping package and overwriting signature, allowing automatic updates from remote repository.
PYTHONHOME=/opt/wapt PYTHONPATH=/opt/wapt WAPT_CERT=/opt/wapt/wapt-scripts/certs/wapt.crt WAPT_KEY=/opt/wapt/wapt-scripts/certs/key.pem WAPT_PASSWD=key_password /opt/wapt/bin/python /opt/wapt/wapt-scripts/wapt-addpackage.py vlc
- name
Mandatory, package name to search for
- --allversions
Display all packages versions
- --nocheckcert
Do not check for remote certificate validity when importing, caution this may be dangerous
- --verbose
Log everything (including debug)
Synchronize local Packages repository with official remote repository. The main goal is to update packages imported with wapt-addpackage.py.
Can also be used in a daily cron task, if you trust the remote repository.
echo "0 3 * * * root PYTHONHOME=/opt/wapt PYTHONPATH=/opt/wapt WAPT_CERT=/opt/wapt/wapt-script/certs/wapt.crt WAPT_KEY=/opt/wapt/wapt-scripts/certs/key.pem WAPT_PASSWD=key_password /opt/wapt/bin/python /opt/wapt/wapt-scripts/wapt-sync.py --quiet" >> /etc/crontab
- --dryrun
Do not actually do anything, just output expected changes to STDOUT
- --nocheckcert
Do not check for remote certificate validity when importing, caution this may be dangerous
- --force
Ignore cache cache and always try to fetch new packages if possible
- --quiet
Log only errors and warnings
- --verbose
Log everything (including debug)