mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Adding snapcraft build support from source
Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
This commit is contained in:
parent
60495e4765
commit
a538c14976
11 changed files with 385 additions and 0 deletions
BIN
snap/gui/icon.png
Normal file
BIN
snap/gui/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
32
snap/hooks/configure
vendored
Executable file
32
snap/hooks/configure
vendored
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
# read wekan config
|
||||
. $SNAP/bin/config
|
||||
|
||||
# create run dir, we're going to use it for unix socket
|
||||
mkdir -p $SNAP_DATA/share
|
||||
mkdir -p $SNAP_DATA/shared
|
||||
|
||||
# settings were altered by user, safest way to get them applied is to restart service
|
||||
|
||||
# TODO: remove this workaround once it's not needed
|
||||
# for the moment we can't read settings outside of the hook,
|
||||
# so store all settings in helpper script which is then picked by main wrapper
|
||||
echo -e "#!/bin/sh\n" > $SETTINGS_FILE
|
||||
for key in ${keys[@]}
|
||||
do
|
||||
# snappy is picky about key syntax, using mapping
|
||||
MAP_KEY="KEY_$key"
|
||||
if value=$(snapctl get ${!MAP_KEY}); then
|
||||
echo "export $key='$value'" >> $SETTINGS_FILE
|
||||
elif [ -d "${!key}" ]; then
|
||||
# store back value from SETTINGS_FILE
|
||||
echo "export $key='${!key}'" >> $SETTINGS_FILE
|
||||
fi
|
||||
done
|
||||
|
||||
# set file executable
|
||||
chmod 755 $SETTINGS_FILE
|
||||
# we can't use snapctl to restart service, may be one day ....
|
||||
|
||||
echo "Setting has been updated, restart service."
|
Loading…
Add table
Add a link
Reference in a new issue