Kebutuhan:
Langkah-langkah:
git clone https://github.com/ftisunpar/IFStudentPortal
cd IFStudentPortal
git submodule update --init -- SIAModels
./activator eclipse
Langkah-langkah (pada direktori proyek Play IFStudentPortal/StudentPortal
):
./activator run
Saat ini hanya bisa dilakukan di Linux
Langkah-langkah (pada direktori proyek Play IFStudentPortal/StudentPortal
):
functionaltest-template.conf
pada direktori conf/
ke functionaltest.conf
dan sesuaikan isinya dengan username/password yang benar./activator test
Kebutuhan:
Langkah-langkah:
git clone https://github.com/ftisunpar/IFStudentPortal
cd IFStudentPortal
git submodule update --init -- SIAModels
cd conf
cat > password.conf
, ketikkan huruf/angka acak, dan tekan Ctrl+Dcd ../certs
./gencerts.sh
cd ..
dan eksekusi build ./activator stage
Hasil build ada di target/universal/stage
target/universal/stage/bin
./ifstudentportal -Dhttps.port=9443 -Dplay.server.https.keyStore.path=../conf/IFStudentPortal.jks -Dplay.server.https.keyStore.password="$(cat ../conf/password.conf)" -Dapplication.secret="$(cat ../conf/password.conf)"
(jika tidak punya akses root)sudo ./ifstudentportal -Dhttps.port=443 -Dhttp.port=80 -Dplay.server.https.keyStore.path=../conf/IFStudentPortal.jks -Dplay.server.https.keyStore.password="$(cat ../conf/password.conf)" -Dapplication.secret="$(cat ../conf/password.conf)"
(jika punya akses root)Di Ubuntu, buat file /etc/init.d/ifstudentportal
yang isinya seperti di bawah (lihat keterangan juga di bawah):
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: ifstudentportal
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the ifstudentportal server daemon
# Description: Start and stop the ifstudentportal server daemon
### END INIT INFO
#
# Get function from functions library
. /lib/lsb/init-functions
# Start the service IFStudentPortal
PIDNUM=""
HOMEDIR="/home/pascal/IFStudentPortal/target/universal/stage/"
PIDFILE="RUNNING_PID"
PIDDIR="$HOMEDIR$PIDFILE"
BINFILE="bin/ifstudentportal"
BINDIR="$HOMEDIR$BINFILE"
start() {
if [ ! -f $PIDDIR ]
then
$BINDIR -Dhttps.port=443 -Dhttp.port=80 -Dplay.server.https.keyStore.path=$HOMEDIR/conf/IFStudentPortal.jks -Dplay.server.https.keyStore.password="$(cat $HOMEDIR/conf/password.conf)" -Dapplication.secret="$(cat $HOMEDIR/conf/password.conf)" &
echo "IFStudentPortal Started"
else
echo "IFStudentPortal is already Running"
fi
}
# Restart the service IFStudentPortal
stop() {
if [ -f $PIDDIR ]
then
PIDNUM=$(cat $PIDDIR)
kill $PIDNUM
### Now, delete the pid file ###
rm -f $PIDDIR
echo "IFStudentPortal Stopped"
else
echo "IFStudentPortal is not Running"
fi
}
status() {
if [ -f $PIDDIR ]
then
echo "IFStudentPortal is Running"
else
echo "IFStudentPortal is not Running"
fi
}
restart() {
if [ -f $PIDDIR ]
then
stop
start
else
echo "IFStudentPortal is not Running"
fi
}
### main logic ###
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart|reload|condrestart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0
Keterangan:
$HOMEDIR
dengan path yang sesuaichmod
file tersebut dengan 744 (sebaiknya hanya boleh dieksekusi oleh root
)sudo update-rc.d ifstudentportal
untuk mendaftarkan ke startupStudentPortal
dan jalankan ./activator stage