#!/usr/bin/perl

use strict;
use warnings;
use FindBin qw( $Bin );
use File::Copy qw( copy );
use Expect;
use lib "$Bin/../software";
use Common qw( commands );

my @path = split /\//, $Bin;
my $pen_path = "";

if ($path[1] eq 'opt') {
  $pen_path = "/".$path[2]."/".$path[3];
}
elsif ($path[1] eq 'var') {
  $pen_path = "/".$path[3]."/".$path[4];
}
else {
  $pen_path = "/".$path[1]."/".$path[2];
}

&commands();

system("sed '1 asleep 5' /opt/bin/xfce/screen.sh > /tmp/__screen.sh");
copy("/tmp/__screen.sh", "/opt/bin/xfce/screen.sh");
unlink "/etc/udev/rules.d/99-displaylink.rules";

system("touch /.configured");
system("reboot");


