mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-24 14:01:56 +00:00
Update photoprism-install.sh
This commit is contained in:
parent
da171df9b6
commit
0acacfa515
@ -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]
|
# PhotoPrism storage directories
|
||||||
#Description=PhotoPrism service
|
PHOTOPRISM_STORAGE_PATH='/var/lib/photoprism'
|
||||||
#After=network.target
|
PHOTOPRISM_ORIGINALS_PATH='/var/lib/photoprism/photos/Originals"
|
||||||
|
PHOTOPRISM_IMPORT_PATH='/var/lib/photoprism/photos/Import'
|
||||||
|
|
||||||
#[Service]
|
# Uncomment below if using MariaDB/MySQL instead of SQLite (the default)
|
||||||
#Type=forking
|
# PHOTOPRISM_DATABASE_DRIVER='mysql'
|
||||||
#User=photoprism
|
# PHOTOPRISM_DATABASE_SERVER='MYSQL_IP_HERE'
|
||||||
#Group=photoprism
|
# PHOTOPRISM_DATABASE_NAME='DB_NAME'
|
||||||
#WorkingDirectory=/opt/photoprism
|
# PHOTOPRISM_DATABASE_USER='USER_NAME'
|
||||||
#EnvironmentFile=/var/lib/photoprism/.env
|
# PHOTOPRISM_DATABASE_PASSWORD='PASSWORD' " > $env_path
|
||||||
#ExecStart=/opt/photoprism/bin/photoprism up -d
|
|
||||||
#ExecStop=/opt/photoprism/bin/photoprism down
|
|
||||||
|
|
||||||
#[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…
Reference in New Issue
Block a user