Update photoprism-install.sh

pull/84/head
tteckster 3 years ago committed by GitHub
parent da171df9b6
commit 0acacfa515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -104,28 +104,44 @@ sudo cp -a assets/ /opt/photoprism/assets/
sudo chown -R photoprism:photoprism /opt/photoprism sudo chown -R photoprism:photoprism /opt/photoprism
echo -e "${CM}${CL} \r" echo -e "${CM}${CL} \r"
#echo -en "${GN} Creating Service file photoprism.service... " env_path="/var/lib/photoprism/.env"
#service_path="/etc/systemd/system/photoprism.service" echo " # Initial password for the admin user
PHOTOPRISM_ADMIN_PASSWORD='photoprism'
#echo "[Unit]
#Description=PhotoPrism service # PhotoPrism storage directories
#After=network.target PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism'
PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals"
#[Service] PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import'
#Type=forking
#User=photoprism # Uncomment below if using MariaDB/MySQL instead of SQLite (the default)
#Group=photoprism # PHOTOPRISM_DATABASE_DRIVER='mysql'
#WorkingDirectory=/opt/photoprism # PHOTOPRISM_DATABASE_SERVER='MYSQL_IP_HERE'
#EnvironmentFile=/var/lib/photoprism/.env # PHOTOPRISM_DATABASE_NAME='DB_NAME'
#ExecStart=/opt/photoprism/bin/photoprism up -d # PHOTOPRISM_DATABASE_USER='USER_NAME'
#ExecStop=/opt/photoprism/bin/photoprism down # PHOTOPRISM_DATABASE_PASSWORD='PASSWORD' " > $env_path
#[Install] echo -en "${GN} Creating Service file photoprism.service... "
#WantedBy=multi-user.target" > $service_path service_path="/etc/systemd/system/photoprism.service"
#sudo systemctl daemon-reload
#sudo systemctl start photoprism echo "[Unit]
#sudo systemctl enable photoprism &>/dev/null Description=PhotoPrism service
#echo -e "${CM}${CL} \r" After=network.target
[Service]
Type=forking
User=photoprism
Group=photoprism
WorkingDirectory=/opt/photoprism
EnvironmentFile=/var/lib/photoprism/.env
ExecStart=/opt/photoprism/bin/photoprism up -d
ExecStop=/opt/photoprism/bin/photoprism down
[Install]
WantedBy=multi-user.target" > $service_path
sudo systemctl daemon-reload
sudo systemctl start photoprism
sudo systemctl enable photoprism &>/dev/null
echo -e "${CM}${CL} \r"
PASS=$(grep -w "root" /etc/shadow | cut -b6); PASS=$(grep -w "root" /etc/shadow | cut -b6);
if [[ $PASS != $ ]]; then if [[ $PASS != $ ]]; then

Loading…
Cancel
Save

Powered by BW's shoe-string budget.