Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bb98f2515 | ||
|
|
93095c630c |
@@ -0,0 +1,13 @@
|
||||
Alias /yms /usr/share/yms/webgui
|
||||
|
||||
<Directory /usr/share/yms/webgui>
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
|
||||
<FilesMatch "\.inc$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
DirectoryIndex index.php
|
||||
</Directory>
|
||||
@@ -0,0 +1,15 @@
|
||||
location ^~ /yms/ {
|
||||
alias /usr/share/yms/webgui/;
|
||||
index index.php;
|
||||
}
|
||||
|
||||
location ~ ^/yms/.*\.inc$ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/yms/(.+\.php)$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /usr/share/yms/webgui/$1;
|
||||
fastcgi_param SCRIPT_NAME /yms/$1;
|
||||
fastcgi_pass unix:@PHP_FPM_SOCKET@;
|
||||
}
|
||||
@@ -20,6 +20,7 @@ INSERT INTO settings (userid, sno, valint) VALUES
|
||||
|
||||
/* setting descriptions */
|
||||
INSERT INTO settings (userid, sno, valstr) VALUES
|
||||
(-1, 0, 'database schema version'),
|
||||
(-1, 1, 'vessel id'),
|
||||
(-1, 2, 'date format'),
|
||||
(-1, 3, 'user menu'),
|
||||
|
||||
Vendored
+2
@@ -7,4 +7,6 @@ db_input high yms/db-name || true
|
||||
db_input high yms/db-user || true
|
||||
db_input high yms/db-password || true
|
||||
|
||||
db_input high yms/webgui || true
|
||||
|
||||
db_go
|
||||
|
||||
Vendored
+6
-1
@@ -17,6 +17,11 @@ Depends:
|
||||
gir1.2-gtk-3.0,
|
||||
gir1.2-rsvg-2.0,
|
||||
python3-mysqldb,
|
||||
python3-bcrypt
|
||||
python3-bcrypt,
|
||||
php (>= 8.0),
|
||||
php-mysql,
|
||||
php-xml,
|
||||
gettext,
|
||||
mupdf-tools
|
||||
Description: Yacht Management Software
|
||||
Yacht management software with native GTK GUI and web interface.
|
||||
|
||||
Vendored
+4
@@ -17,6 +17,7 @@ webgui/js/* usr/share/yms/webgui/js/
|
||||
webgui/img/* usr/share/yms/webgui/img/
|
||||
webgui/locale/de_DE/LC_MESSAGES/yms.mo usr/share/yms/webgui/locale/de_DE/LC_MESSAGES/
|
||||
webgui/sailboat.svg usr/share/yms/webgui/
|
||||
webgui/config.inc-sample usr/share/yms/
|
||||
|
||||
# Shared static data
|
||||
shapes/* usr/share/yms/shapes/
|
||||
@@ -26,3 +27,6 @@ yms.desktop usr/share/applications/
|
||||
|
||||
# Idesktop link file
|
||||
yms.lnk usr/share/yms/
|
||||
|
||||
# Webserver
|
||||
config/apache/yms.conf /etc/apache2/conf-available/
|
||||
|
||||
Vendored
+63
@@ -3,6 +3,28 @@ set -e
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
detect_webservers()
|
||||
{
|
||||
WEB_SERVERS=""
|
||||
|
||||
if dpkg-query -W -f='${Status}' apache2 2>/dev/null |
|
||||
grep -q 'install ok installed'; then
|
||||
WEB_SERVERS="$WEB_SERVERS apache2"
|
||||
fi
|
||||
|
||||
if dpkg-query -W -f='${Status}' nginx 2>/dev/null |
|
||||
grep -q 'install ok installed'; then
|
||||
WEB_SERVERS="$WEB_SERVERS nginx"
|
||||
fi
|
||||
|
||||
if dpkg-query -W -f='${Status}' lighttpd 2>/dev/null |
|
||||
grep -q 'install ok installed'; then
|
||||
WEB_SERVERS="$WEB_SERVERS lighttpd"
|
||||
fi
|
||||
|
||||
WEB_SERVERS="${WEB_SERVERS# }"
|
||||
}
|
||||
|
||||
db_get yms/db-name
|
||||
DB_NAME="$RET"
|
||||
|
||||
@@ -27,4 +49,45 @@ else
|
||||
mariadb "${DB_NAME}" < /usr/share/yms/db/minimal.sql
|
||||
echo "Database schema initialized."
|
||||
fi
|
||||
|
||||
db_get yms/webgui
|
||||
if [ "$RET" = "true" ]; then
|
||||
|
||||
detect_webservers
|
||||
case "$WEB_SERVERS" in
|
||||
"")
|
||||
echo "No supported webserver installed."
|
||||
;;
|
||||
apache2)
|
||||
echo "Apache detected."
|
||||
a2enconf yms
|
||||
invoke-rc.d apache2 reload
|
||||
echo "Web GUI for apache2 enabled."
|
||||
;;
|
||||
nginx)
|
||||
echo "nginx detected."
|
||||
;;
|
||||
lighttpd)
|
||||
echo "lighttpd detected."
|
||||
;;
|
||||
*)
|
||||
echo "Multiple webservers detected: $WEB_SERVERS"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ ! -f /etc/yms/config.inc ]; then
|
||||
# create initial configuration
|
||||
sed \
|
||||
-e "s|@DB_USERNAME@|$DB_USER|g" \
|
||||
-e "s|@DB_PASSWORD@|$DB_PASSWORD|g" \
|
||||
-e "s|@DB_SCHEMA@|$DB_NAME|g" \
|
||||
/usr/share/yms/config.inc-sample \
|
||||
> /etc/yms/config.inc
|
||||
chmod 0640 /etc/yms/config.inc
|
||||
chown root:www-data /etc/yms/config.inc
|
||||
ln -s /etc/yms/config.inc /usr/share/yms/webgui/config.inc
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
Vendored
+1
@@ -17,6 +17,7 @@ override_dh_install:
|
||||
install -D -m 0755 debian/yms-launcher debian/yms/usr/bin/yms
|
||||
dh_install
|
||||
sed -i 's#@PREFIX@#/usr#g' debian/yms/usr/share/applications/yms.desktop
|
||||
sed -i 's#@PREFIX@#/usr#g' debian/yms/usr/share/yms/yms.lnk
|
||||
|
||||
# Installation is handled by debian/install
|
||||
override_dh_auto_install:
|
||||
|
||||
Vendored
+9
@@ -14,3 +14,12 @@ Template: yms/db-password
|
||||
Type: password
|
||||
Description: Web GUI database password:
|
||||
Please enter the password for the YMS web interface database user.
|
||||
|
||||
Template: yms/webgui
|
||||
Type: boolean
|
||||
Default: false
|
||||
Description: Enable the YMS web interface?
|
||||
The YMS package includes a web interface that can be served
|
||||
by a web server.
|
||||
.
|
||||
Do you want to enable the web interface?
|
||||
|
||||
@@ -17,9 +17,9 @@ define('APP_ILLUSTRATION', 'sailboat.svg');
|
||||
|
||||
// database connection
|
||||
$g_db_host = 'localhost';
|
||||
$g_db_username = 'ymsweb';
|
||||
$g_db_password = 'changeme!';
|
||||
$g_db_schema = 'yms';
|
||||
$g_db_username = '@DB_USERNAME@';
|
||||
$g_db_password = '@DB_PASSWORD@';
|
||||
$g_db_schema = '@DB_SCHEMA@';
|
||||
|
||||
// mail settings
|
||||
$g_mail_enable = FALSE;
|
||||
|
||||
Reference in New Issue
Block a user