remove unneseccary file
This commit is contained in:
@@ -1,65 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# -------------------- todo ------------------------- #
|
||||
# - [ ] read password from ansible vars file if possible
|
||||
# --------------------------------------------------- #
|
||||
|
||||
# ------------------ Variables ----------------------- #
|
||||
my_domain="owncloud.softbox.net"
|
||||
my_ip=$(hostname -I | cut -f1 -d ' ')
|
||||
database="mysql"
|
||||
database_name="owncloud"
|
||||
database_user="owncloud"
|
||||
database_pass=""
|
||||
data_dir="/var/www/owncloud/data"
|
||||
admin_user="root"
|
||||
admin_pass=""
|
||||
# --------------------------------------------------- #
|
||||
|
||||
# Exit if not run as root
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Install owncloud
|
||||
occ maintenance:install --database "$database" --database-name "$database_name" --database-user "$database_user" --database-pass "$database_pass" --data-dir "$data_dir" --admin-user "$admin_user" --admin-pass "$admin_pass"
|
||||
|
||||
# Set trusted domains
|
||||
occ config:system:set trusted_domains 1 --value="$my_ip"
|
||||
occ config:system:set trusted_domains 2 --value="$my_domain"
|
||||
|
||||
# Set background job mode to cron
|
||||
occ background:cron
|
||||
|
||||
# Set the execution of two cron jobs
|
||||
echo "*/15 * * * * /var/www/owncloud/occ system:cron" |
|
||||
sudo -u www-data -g crontab tee -a \
|
||||
/var/spool/cron/crontabs/www-data
|
||||
echo "0 2 * * * /var/www/owncloud/occ dav:cleanup-chunks" |
|
||||
sudo -u www-data -g crontab tee -a \
|
||||
/var/spool/cron/crontabs/www-data
|
||||
|
||||
# Sync with LDAP server
|
||||
echo "1 */6 * * * /var/www/owncloud/occ user:sync \
|
||||
'OCA\User_LDAP\User_Proxy' -m disable -vvv >> \
|
||||
/var/log/ldap-sync/user-sync.log 2>&1" |
|
||||
sudo -u www-data -g crontab tee -a \
|
||||
/var/spool/cron/crontabs/www-data
|
||||
mkdir -p /var/log/ldap-sync
|
||||
touch /var/log/ldap-sync/user-sync.log
|
||||
chown www-data. /var/log/ldap-sync/user-sync.log
|
||||
|
||||
# Configure Caching and File Locking
|
||||
occ config:system:set \
|
||||
memcache.local \
|
||||
--value '\OC\Memcache\APCu'
|
||||
occ config:system:set \
|
||||
memcache.locking \
|
||||
--value '\OC\Memcache\Redis'
|
||||
occ config:system:set \
|
||||
redis \
|
||||
--value '{"host": "127.0.0.1", "port": "6379"}' \
|
||||
--type json
|
||||
|
||||
systemctl restart apache2
|
||||
Reference in New Issue
Block a user