Last active
October 31, 2022 17:04
-
-
Save Pitastic/8ccf4ce022e9e5eead3cc40ade97da60 to your computer and use it in GitHub Desktop.
Install PicApport under FreeBSD 12.3 (TrueNAS Jail)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Create a new Basejail | |
# 2. Network: Setup a network config for this jail (internet needed) | |
# 3. Jail Properties: allow_mount (devfs, procfs, tmpfs) <- not sure if really needed ! | |
# 4. Copy `picapport_service` to `/etc/rc.d/picapport` (in the Jail) | |
# 5. Install JDK (https://openjdk.org) and wget (for downloads) | |
pkg install wget java/openjdk11-jre | |
# 6. Get PicApport and prepare folders | |
wget 'https://www.picapport.de/prepare_download.php?dlfile=10-4-00%2fpicapport-headless.jar' -O picapport-headless.jar | |
mkdir /usr/local/picapport | |
mv picapport-headless.jar /usr/local/ | |
# 7. First start | |
exec java -Xms512m -Xmx1024m -Djava.awt.headless=true -DTRACE=WARNING -Duser.language=de -Duser.home=/usr/local/picapport -jar /usr/local/picapport-headless.jar | |
# (CTRL+C after the last logline "PicApport starts a new day") | |
# 8. Configure | |
# Folders are now created under /usr/local/picapport/.picapport | |
# Setup up your config, add mountpoints to the jail etc.. | |
# 9. Autostart | |
chmod a+x /etc/rc.d/picapport | |
sysrc picapport_enable="YES" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
. /etc/rc.subr | |
name=picapport | |
rcvar=picapport_enable | |
start_cmd="${name}_start" | |
stop_cmd=":" | |
load_rc_config $name | |
picapport_start() | |
{ | |
rm -rf /usr/local/picapport/.picapport/db/* | |
rm -rf /tmp/cache/* | |
exec /usr/local/bin/java -Xms512m -Xmx1024m -Djava.awt.headless=true -DTRACE=WARNING -Duser.language=de -Duser.home=/usr/local/picapport -jar /usr/local/picapport-headless.jar 2>&1 & | |
} | |
run_rc_command "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment