# don't delete this line
version:
    version: 3.2.x
    comment: 'Multiline comment on this version.
              Don''t forget to escape single quotes by doubling them'

# to add parameters to a file, end the path by a colon, and add the parameters below with an indent. 
# Example : 
#    - /usr/lib/idefix/dhcp-parse.py: 
#          overwrite: false  [default is true]
#          permissions: 600  [ default is 755 for *.py and *.bash, 644 for the others]

pre-update:
    - echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
    - wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
    - apt update
    

# Ne pas tenir compte du warning sur GPG


files:
   
    - /etc/nginx/sites-available/idefix.conf
    #- /var/www/shelteradmin-1.0.0beta3.zip
    #- /usr/lib/idefix/
    #- /usr/lib/idefix/admin/
    #- /usr/lib/idefix/api/
    #- /etc/idefix/
    #- /var/www/admin/
    #- /var/www/filter/


install:
     - lsb-release
     - ca-certificates
     - apt-transport-https
     - software-properties-common
     - gnupg2
     - php8.1
     - php8.1-bcmath
     - php8.1-fpm
     - php8.1-xml
     - php8.1-mysql
     - php8.1-zip
     - php8.1-intl
     - php8.1-gd
     - php8.1-cli
     - php8.1-bz2
     - php8.1-curl
     - php8.1-mbstring
     - php8.1-opcache
     - php8.1-cgi

post-update:
    - sed -i 's/\[www\]/\[rock64\]/' /etc/php/8.1/fpm/pool.d/www.conf
    - sed -i 's/\www-data/rock64/g'  /etc/php/8.1/fpm/pool.d/www.conf
    - service nginx restart
    - service php7.4-fpm restart
    - service php8.1-fpm restart

options:
    stop: 0
