AutoMISP icon indicating copy to clipboard operation
AutoMISP copied to clipboard

cp: cannot create regular file '/etc/php/?.?/apache2/php.ini.bak': No such file or directory

Open Uri-CyberWrite opened this issue 6 years ago • 1 comments

[*] modifying /etc/php/7.0/apache2/php.ini to use redis.so.. cp: cannot create regular file '/etc/php/?.?/apache2/php.ini.bak': No such file or directory

Please update the install script with your version of PHP, in my case it looks like this after the change (PHP version 7.2):

#php.ini has to be modified to use the redis-php extension. before we make any changes, we back up the default php config. If the backup exists, we assume the php-redis extention was installed already

print_status "modifying /etc/php/7.2/apache2/php.ini to use redis.so.."
if [ -f /etc/php/7.2/apache2/php.ini.bak ]; then
        print_notification "redis.so already enabled"
else
        cp /etc/php/7.2/apache2/php.ini /etc/php/7.2/apache2/php.ini.bak
        echo "; Support for phpredis - added on `date`" >> /etc/php/?.?/apache2/php.ini
        echo "extension=redis.so" >> /etc/php/?.?/apache2/php.ini
fi

Uri-CyberWrite avatar May 07 '19 09:05 Uri-CyberWrite

yep, seems path wildcards do not work with cp - https://stackoverflow.com/questions/35708506/linux-wildcard-usage-in-cp-and-mv

https://github.com/da667/AutoMISP/blob/0d5671288307781ddabcc69d579dbaac92672379/auto-MISP-ubuntu.sh#L315

wesinator avatar Jan 02 '20 01:01 wesinator