Skip to content

Commit e29c417

Browse files
author
nacho
committed
added nc-webui
1 parent 9eadaec commit e29c417

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

etc/nextcloudpi-config.d/nc-webui.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
# Periodically synchronize NextCloud for externally modified files
4+
#
5+
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
6+
# GPL licensed (see end of file) * Use at your own risk!
7+
#
8+
# Usage:
9+
#
10+
# ./installer.sh nc-webui.sh <IP>
11+
#
12+
# See installer.sh instructions for details
13+
# More at: https://ownyourbits.com
14+
#
15+
16+
ACTIVE_=yes
17+
DESCRIPTION="Enable or disable the NCP web interface"
18+
19+
configure()
20+
{
21+
if [[ $ACTIVE_ != "yes" ]]; then
22+
a2dissite ncp
23+
echo "ncp-web disabled"
24+
else
25+
a2ensite ncp
26+
echo "ncp-web enabled"
27+
fi
28+
29+
# delayed in bg so it does not kill the connection, and we get AJAX response
30+
( sleep 2 && systemctl restart apache2 ) &>/dev/null &
31+
}
32+
33+
install() { :; }
34+
cleanup() { :; }
35+
36+
# License
37+
#
38+
# This script is free software; you can redistribute it and/or modify it
39+
# under the terms of the GNU General Public License as published by
40+
# the Free Software Foundation; either version 2 of the License, or
41+
# (at your option) any later version.
42+
#
43+
# This script is distributed in the hope that it will be useful,
44+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
45+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46+
# GNU General Public License for more details.
47+
#
48+
# You should have received a copy of the GNU General Public License
49+
# along with this script; if not, write to the
50+
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
51+
# Boston, MA 02111-1307 USA
52+

0 commit comments

Comments
 (0)