Video Archive (Java): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 1: | Zeile 1: | ||
== WAR-Datei aktualisieren == | |||
<pre> | |||
#!/bin/bash | |||
# Bash Menu Script Example | |||
repository=/home/martin/GitRepository | |||
PS3='Please enter your choice: ' | |||
options=("Update war-file" "Restart server" "Stop server" "Quit") | |||
select opt in "${options[@]}" | |||
do | |||
case $opt in | |||
"Update war-file") | |||
sudo -u tomcat bin/shutdown.sh >> /dev/null 2>&1; | |||
sudo -u tomcat rm -r ./webapps/video-archive* >> /dev/null 2>&1; | |||
sudo cp ${repository}/VideoArchiveServer/target/video-archive.war webapps/ >> /dev/null 2>&1; | |||
sudo chown tomcat:tomcat webapps/video-archive.war >> /dev/null 2>&1; | |||
sudo -u tomcat bin/startup.sh >> /dev/null 2>&1; | |||
;; | |||
"Restart server") | |||
sudo -u tomcat bin/shutdown.sh >> /dev/null 2>&1; | |||
sudo -u tomcat bin/startup.sh >> /dev/null 2>&1; | |||
;; | |||
"Stop server") | |||
sudo -u tomcat bin/shutdown.sh >> /dev/null 2>&1; | |||
;; | |||
"Quit") | |||
break | |||
;; | |||
*) echo "invalid option $REPLY";; | |||
esac | |||
done | |||
</pre> | |||
== Testen == | == Testen == | ||
Version vom 25. Oktober 2018, 17:16 Uhr
WAR-Datei aktualisieren
#!/bin/bash # Bash Menu Script Example repository=/home/martin/GitRepository PS3='Please enter your choice: ' options=("Update war-file" "Restart server" "Stop server" "Quit") select opt in "${options[@]}" do case $opt in "Update war-file") sudo -u tomcat bin/shutdown.sh >> /dev/null 2>&1; sudo -u tomcat rm -r ./webapps/video-archive* >> /dev/null 2>&1; sudo cp ${repository}/VideoArchiveServer/target/video-archive.war webapps/ >> /dev/null 2>&1; sudo chown tomcat:tomcat webapps/video-archive.war >> /dev/null 2>&1; sudo -u tomcat bin/startup.sh >> /dev/null 2>&1; ;; "Restart server") sudo -u tomcat bin/shutdown.sh >> /dev/null 2>&1; sudo -u tomcat bin/startup.sh >> /dev/null 2>&1; ;; "Stop server") sudo -u tomcat bin/shutdown.sh >> /dev/null 2>&1; ;; "Quit") break ;; *) echo "invalid option $REPLY";; esac done
Testen
Spring Security
curl -XPOST -d 'username=martin&password=kirner' http://localhost:8080/video-archive/public/general/login curl -H 'Authorization: Bearer <UUID>' http://localhost:8080/video-archive/secured/videos/test curl -H 'Authorization: Bearer <UUID>' http://localhost:8080/video-archive/secured/general/logout
Zurück zu Hauptseite