Have your films organized.
This app will help you to keep all your films organized.
- crontab -e
*/5 * * * * cd /usr/share/films && /usr/bin/rake RAILS_ENV=production films:update_disk[/home/marcel/.aMule/Incoming] > /dev/null 2>&1- logrotate
Generate file /etc/logrotate.d/films with content:
/usr/share/films/log/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
copytruncate
}
Avoid fsck interactivity on boot
Edit file /etc/default/rcS and set FSCKFIX=yes
Service for delayed jobs:
- Edit file
/etc/systemd/system/films_delayed_job.serviceand set this content:
[Unit]
Description=Films delayed jobs
Requires=mysql.service
After=mysql.service
[Service]
Environment=RAILS_ENV=production
Type=forking
ExecStart=/usr/share/films/bin/delayed_job start
ExecStop=/usr/share/films/bin/delayed_job stop
Restart=on-failure
PIDFile=/usr/share/films/tmp/pids/delayed_job.pidAllow rails app to move files from films:
sudo setfacl --default -m u::rwx,u:www-data:rwx /home/marcel/myfolder/Access to the DB and execute manually as root user:
ALTER DATABASE films_production SET pg_trgm.similarity_threshold = 0.7Allow user to mount /media/usb:
addgroup ntfsuser
chown root:ntfsuser $(which ntfs-3g)
chown root:ntfsuser /media/usb/
chmod g+w /media/usb
chmod 4750 $(which ntfs-3g)
usermod -aG ntfsuser www-data
usermod -aG disk www-dataEdit /etc/fstab and add:
/dev/sdb1 /media/usb ntfs-3g defaults,gid=1001,user,noauto,rw 0 0
# Time sync service
apt install systemd-timesyncdYou need VS Code extension Remote development.
Then, use CMD+SHIFT+P and select Dev Containers: Open Folder in Container....
After it, open a new terminal and execute:
bundle exec rails db:migrateIf you want to run the server in the container:
bundle exec rails sYou can access to the application via http://127.0.0.1:3000/.
- Copy to external. During the copy, update the files information.
- Update internal disk (Downloads)
- Duplicates not found problerly (e.g. 'Asesino postales' movie)