Skip to content

Commit

Permalink
Rename DDNS apps so they show up together
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTurnschuh authored and nachoparker committed Sep 13, 2018
1 parent 7703ceb commit e26a834
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 73 deletions.
148 changes: 79 additions & 69 deletions changelog.md

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ncp-web/ncp-launcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
// sanity checks
if ( !$_POST['ref'] ) exit( '{ "output": "Invalid request" }' );

preg_match( '/^[0-9A-Za-z-]+$/' , $_POST['ref'] , $matches )
preg_match( '/^[0-9A-Za-z_-]+$/' , $_POST['ref'] , $matches )
or exit( '{ "output": "Invalid input" , "token": "' . getCSRFToken() . '" }' );

// CSRF check
Expand Down
4 changes: 2 additions & 2 deletions ncp-web/wizard/JS/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ $(document).ready(function(){

// Enable FreeDNS step
$('#ddns-enable-freedns').on('click', function(){
launch_action( 'freeDNS',
launch_action( 'DDNS_freeDNS',
{
"ACTIVE":"yes",
"DOMAIN": $("#ddns-domain" ).val(),
Expand All @@ -269,7 +269,7 @@ $(document).ready(function(){

// Enable noip step
$('#ddns-enable-noip').on('click', function(){
launch_action( 'no-ip',
launch_action( 'DDNS_no-ip',
{
"ACTIVE":"yes",
"DOMAIN": $("#ddns-domain" ).val(),
Expand Down
9 changes: 8 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ source /usr/local/etc/library.sh

mkdir -p "$CONFDIR"

# rename DDNS entries TODO temporary
[[ -f "$CONFDIR"/no-ip.sh ]] && {
mv "$CONFDIR"/no-ip.sh "$CONFDIR"/DDNS_no-ip.sh
mv "$CONFDIR"/freeDNS.sh "$CONFDIR"/DDNS_freeDNS.sh
mv "$CONFDIR"/duckDNS.sh "$CONFDIR"/DDNS_duckDNS.sh
mv "$CONFDIR"/spDYN.sh "$CONFDIR"/DDNS_spDYN.sh
}

# prevent installing some apt packages in the docker version
[[ -f /.docker-image ]] && {
for opt in $EXCL_DOCKER; do
Expand Down Expand Up @@ -127,7 +135,6 @@ chmod 770 /var/www/ncp-web
apt-get install -y --no-install-recommends php-imagick imagemagick-6-common
}


} # end - only live updates

exit 0
Expand Down

0 comments on commit e26a834

Please sign in to comment.